Hi All.. Which is the best method to count the number of records retrieved by an SQL?? Is it to navigate through the RecordSet till the end? or is there a better method ? Pls suggest Thanks Sridhar
Joined: Mar 06, 2002
Hi sridhar, it depends on ur requirement.To keep a count of the number of records in the middle of the query, then u can define a integer variable and keep incrementing it after each retreiving each record. i already posted the code in this forum some time back.. cheers, Raj
Joined: Jun 25, 2001
Hi, Instead of traversing the whole ResultSet and then getting the count, a simpler option is do get the count of the rows using the statement select count(*) from <table-name> Hope It Helps.