Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning rs.recordcount when it's -1 1

Status
Not open for further replies.

TTThio

Programmer
May 3, 2001
185
US
Hi,

I'm taking data from ODBC. The rs.recordcount return -1 (Can't be determined). Is there another way to return the real number of records count?

Thanks a lot.

Tin Tin
 
Before you get the recordset, could you do a query to count the records?

SELECT count(*)
FROM MyTable;

Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
 
Terry,

that's actually the method that I can use to return records number. Thanks, problem is solved.

Tin Tin
 
You can use the query method or still use the recordset method - your choice. To get an accurate record count from the recordset, use the .MoveLast method first. Then the recordcount property will be accurate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top