Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ResultSet object

 
L. Riley
Greenhorn
Posts: 28
  • 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: 1511
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic