wood burning stoves 2.0*
The moose likes JDBC and the fly likes Count the Records Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Count the Records" Watch "Count the Records" New topic
Author

Count the Records

Jagmohan Negi
Greenhorn

Joined: Aug 24, 2005
Posts: 27
How can i count the number of records returned by a resultset.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


or:


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Rajesh Agarwal
Ranch Hand

Joined: Aug 01, 2005
Posts: 79
Before running your query, run a select count(*) for your query
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

Use Scrollable ResultSet !! and then you can use this code




Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Count the Records