File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ResultSet when no rows found

 
Martin Lira
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have some jdbc code


Is the ResultSet null when the result is "no rows found", will rs.close() give me an error.

Thanks,
Martin
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33700
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin,
The resultset is never null. So rs.next() will return false and rs.close() will close the empty resultset.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic