다음을 통해 공유


CRecordset::IsEOF

Returns nonzero if the recordset has been positioned after the last record. There is no current record.

BOOL IsEOF( ) const;

Return Value

Nonzero if the recordset contains no records or if you have scrolled beyond the last record; otherwise 0.

Remarks

Call this member function as you scroll from record to record to learn whether you have gone beyond the last record of the recordset. You can also use IsEOF to determine whether the recordset contains any records or is empty. Immediately after you call Open, if the recordset contains no records, IsEOF returns nonzero. When you open a recordset that has at least one record, the first record is the current record and IsEOF returns 0.

If the last record is the current record when you call MoveNext, IsEOF will subsequently return nonzero. If IsEOF returns nonzero and you call MoveNext, an error occurs. If IsEOF returns nonzero, the current record is undefined, and any action that requires a current record will result in an error.

Example

See the example for IsBOF.

Requirements

Header: afxdb.h

See Also

Concepts

CRecordset Class

CRecordset Members

Hierarchy Chart

CRecordset::IsBOF

CRecordset::MoveLast

CRecordset::MoveNext