Export (0) Print
Expand All
Expand Minimize

CRecordset::GetRecordCount

Determines the size of the recordset.

long GetRecordCount( ) const;

The number of records in the recordset; 0 if the recordset contains no records; or –1 if the record count cannot be determined.

Caution note Caution

The record count is maintained as a "high water mark," the highest-numbered record yet seen as the user moves through the records. The total number of records is only known after the user has moved beyond the last record. For performance reasons, the count is not updated when you call MoveLast. To count the records yourself, call MoveNext repeatedly until IsEOF returns nonzero. Adding a record via CRecordset:AddNew and Update increases the count; deleting a record via CRecordset::Delete decreases the count.

Header: afxdb.h

Show:
© 2014 Microsoft