• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Record Count

 
Sam Furtado
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys !!!
Is there a way to find out the number of records returned by a select query without having to make another query (something like select count(*)) that returns the number of records. I mean something similar as in the case of ASP's rs.recordCount() functionality.
Pls let me know.
Thanks Guys
 
Snigdha Solanki
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortuantely, there is no such method available in Java API. Either you use count(*) to get the row count or if you want to know the no of records after query is executed, keep a counter variable and increment it before your while loop ends for each record.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic