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 total records in a result set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "total records in a result set" Watch "total records in a result set" New topic
Author

total records in a result set

ali farid
Ranch Hand

Joined: Aug 26, 2000
Posts: 60
How to get the total no. of records present in a resultset?
and is there any limit on the number of records in a resultset?
David Freels
Ranch Hand

Joined: Feb 01, 2001
Posts: 102
Use ResultSet.last() which will move to the last row and then use ResultSet.getRow() which will return the row number (number of rows). This is available in JDBC 2.0 and above, and this cannot be a FORWARD_ONLY cursor.
Hope this helps.
David
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: total records in a result set