Поделиться через


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.

Заметки

Предупреждающее замечаниеВнимание!

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

См. также

Основные понятия

CRecordset Class

CRecordset Members

Hierarchy Chart

CRecordset::MoveLast

CRecordset::MoveNext

CRecordset::IsEOF

CRecordset::GetStatus