void MoveFirst( );
throw( CDBException, CMemoryException );
Remarks
Call this member function to make the first record in the first rowset the current record. Regardless of whether bulk row fetching has been implemented, this will always be the first record in the recordset.
You do not have to call MoveFirst immediately after you open the recordset. At that time, the first record (if any) is automatically the current record.
Note This member function is not valid for forward-only recordsets.
Note When moving through a recordset, deleted records may not be skipped. See the IsDeleted member function for details.
Caution Calling any of the Move functions throws an exception if the recordset has no records. To determine whether the recordset has any records, call IsBOF and IsEOF.
If you call any of the Move functions while the current record is being updated or added, the updates are lost without warning.
For more information about recordset navigation, see the articles Recordset: Scrolling (ODBC) and Recordset: Bookmarks and Absolute Positions (ODBC) in Visual C++ Programmer’s Guide. For more information about bulk row fetching, see the article Recordset: Fetching Records in Bulk (ODBC) in Visual C++ Programmer’s Guide.
Example
See the example for IsBOF.
CRecordset Overview | Class Members | Hierarchy Chart
See Also CRecordset::Move, CRecordset::MoveLast, CRecordset::MoveNext, CRecordset::MovePrev, CRecordset::IsBOF, CRecordset::IsEOF