Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

determing # of rows in recordset

 
Jeff Sunder
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to get the number of rows in a recordset ?
It seems like this is an easy question, but I have not been able to find any documentation that would help.
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no straight forward way. You can do a count on your select criteria first. If you are using JDBC 2.0, you can move to the last record in the resultset, then check the row id or something like that...not sure. This question has been answered several times in this forum. Use the search facility.

Bosun
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic