File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes No results in query using JDBC, works in Db Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "No results in query using JDBC, works in Db" Watch "No results in query using JDBC, works in Db" New topic
Author

No results in query using JDBC, works in Db

Zak Nixon
Ranch Hand

Joined: Sep 27, 2003
Posts: 126
I am using MySQL as my db.
I have a table called test, with columns (pkId,testId,testRun)
I need to get the highest number from the testRun column based on the testId.

I place this query in my DB query executor :



It works.

When I place it in my JDBC select statement, it returns no matching rows.

Is there something particular about this query that allows JDBC not to work ?

Thanks

Zak
Zak Nixon
Ranch Hand

Joined: Sep 27, 2003
Posts: 126
I found my problem, and it was nothing
to do with the query.

Regards,

Zak Nixon
 
 
subject: No results in query using JDBC, works in Db
 
Similar Threads
JDBC Connection Pooling
Will this code work fine?
Query works in DB, but not with JDBC (MS version)
eager fetching of lazy formulas via criteria api
which is more efficient wait() and notify() or join() for this scenario?