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

 
Ekrem Altintas
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a resultset object.I want to know if record(s) exist or not.Do you know a method for it?
 
Michael Duffy
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ekrem Altintas:
I created a resultset object.I want to know if record(s) exist or not.Do you know a method for it?


yes, java.sql.ResultSet.next() method returns true if there's another record available, false if not.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its better to check the API Docs prior to post this kind of questions.
 
Adam Richards
Ranch Hand
Posts: 135
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's another possible (and reusable) approach. Call the getRowCount() function below & see if the return value is greater than zero.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic