Export (0) Print
Expand All
MFC
Expand Minimize
This topic has not yet been rated - Rate this topic

CRecordset::MoveNext

Makes the first record in the next rowset the current record.

void MoveNext( );

If you have not implemented bulk row fetching, your recordset has a rowset size of 1, so MoveNext simply moves to the next record.

NoteNote:

When you move through a recordset, you cannot skip deleted records. See the IsDeleted member function for details.

Caution noteCaution:

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.

NoteNote:

It is also recommended that you call IsEOF before calling MoveNext. For example, if you have scrolled past the end of the recordset, IsEOF will return nonzero; a subsequent call to MoveNext would throw an exception.

NoteNote:

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). For more information about bulk row fetching, see the article Recordset: Fetching Records in Bulk (ODBC).

This method can throw exceptions of type CDBException* and CMemoryException*.

See the example for IsBOF.

Header: afxdb.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.