dbUpdate()

Writes all the changes made back to the current data record with dbPutField().

Synopsis

int dbUpdate(dbRecordset recordset);

Parameters

Parameter Meaning
recordset Record set reference

Return Value

The return value is an error code, 0 indicates successful execution of the operation. With other values detailed error information can be retrieved using dbGetError().

Errors

On transfer of an invalid record set reference variable or if the data source or record set cannot be modified, an error is returned.

Description

Changing records in record sets is carried out by modifying the fields (via dbPutField() ) and then calling dbUpdate(). The record link is not modified by dbUpdate() .

The dbUpdate() method can only be used with the cursor types adOpenKeyset and adOpenDynamic (provided that the data source supports these types).

Please note that if changes to the current record are open when navigations methods (dbMove...) are called, they are saved by an implicit dbUpdate().

Example

see dbAddNew()

Assignment

ADO, Database functions

Availability

CTRL