wood burning stoves 2.0*
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: No results in query using JDBC, works in Db