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 Android Security Essentials Live Lessons this week in the Android 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: No results in query using JDBC, works in Db
 
Similar Threads
JDBC Connection Pooling
Query works in DB, but not with JDBC (MS version)
which is more efficient wait() and notify() or join() for this scenario?
Will this code work fine?
eager fetching of lazy formulas via criteria api