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 ResultSet return value for an empty query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ResultSet return value for an empty query" Watch "ResultSet return value for an empty query" New topic
Author

ResultSet return value for an empty query

david allen
Ranch Hand

Joined: Sep 27, 2002
Posts: 185
When a query is executed and no resutls are found what value is returned to the ResultSet. In other words I need to determine if the ResultSet is empty.
What method do I use
thanks david
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1134

Hi David,
After you have obtained a "ResultSet", for example:

then if that "ResultSet" is 'empty', the first invocation of the "ResultSet" methos "next()" will return 'false', as in:

Hope this answers your question.
Good Luck,
Avi.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ResultSet return value for an empty query