how to find out how many records returned in recordSet
Joined: Jul 07, 2002
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
Joined: Oct 13, 2002
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.
Joined: Oct 15, 2002
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 ]
Philip Shanks, SCJP - Castro Valley, CA
My boss never outsources or has lay-offs, and He's always hiring. I work for Jesus! Prepare your resume!