• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to find out how many records returned in recordSet

 
k Oyedeji
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have had a look at the documentation for RecordSet but cannot find a field or a method
which returns a count of the amount of records
returned from a query. Do i have to loop through the recordset to find out how many results were
returned?
Thanks
Kola
 
Claudio Gualberto
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kola wrote :
"Do i have to loop through the recordset to find out how many results were returned?"
yes, this is the only way i know to get this information. I'm not a SQL expert and dont know if
there's a SQL statement to bring this kind of information into the resultset, but it's a interesting subject of study.
 
Philip Shanks
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a scrollable RecordSet object, I resorted to:

Then you can do rs.first(); to "rewind" to the beginning.
You just have to keep in mind the offset: row numbering is "1" based, while array indices are zero based.
[ October 15, 2002: Message edited by: Philip Shanks ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic