dbMoveFirst()
Database function which moves the data record pointer to the first record in the record set.
Synopsis
int dbMoveFirst(dbRecordset recordset);
Parameters
Parameter | Meaning |
---|---|
recordset | Record set reference |
Return Value
The return value is an error code; 0 indicates the operation has been performed successfully. For other values dbGetError() can be used to obtain detailed error information.
Errors
An error is returned if an invalid record set reference variable is passed.
Description
dbMoveFirst() is called in order to make the first record in a record set the current record. This method is only permitted for the cursor types adOpenKeyset, adOpenDynamic and adOpenStatic. The data source must allow backwards scrolling through the record set.
One should note that unconfirmed changes (i.e. data fields changed by dbPutField() without dbUpate()) are automatically saved in the data source by an (internal) dbUpdate() call when the data record pointer is changed.
Example
see dbMoveNext()
Assignment
ADO and Qt, Database functions
Availability
CTRL