File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ResultSet object

 
L. Riley
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I retrieve the number of records in a ResultSet?
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do a select count(*) on the querry you plan to execute, or if your are usung JDBC 2.0 you can move to the last row in your resultset using yourresultsetobject.last() and then get your record count based fo the row number.
You may want to do a search in the JDBC forum. It has been discussed there several times.
------------------
Bosun
SCJP for the Java� 2 Platform
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is more appropriate for the JDBC forum. I will move it there for you.
Matthew Phillips
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic