CDaoTableDef::GetRecordCount

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

long GetRecordCount( );

Return Value

The number of records accessed in a tabledef object.

Remarks

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.

Requirements

Header: afxdao.h

See Also

Reference

CDaoTableDef Class

Hierarchy Chart

CDaoTableDef::GetSourceTableName

CDaoTableDef::SetSourceTableName