This topic has not yet been rated - Rate this topic

CDaoTableDef::GetRecordCount 

Call this member function to find out how many records are in a CDaoTableDef object.


long GetRecordCount( );

The number of records accessed in a tabledef object.

Calling GetRecordCount for a table-type CDaoTableDef object reflects the approximate number of records in the table and is affected immediately as table records are added and deleted. Rolled back transactions will appear as part of the record count until you call CDaoWorkSpace::CompactDatabase. A CDaoTableDef object with no records has a record count property setting of 0. When working with attached tables or ODBC databases, GetRecordCount always returns –1.

For related information, see the topic "RecordCount Property" in DAO Help.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.