Completes an AddNew or Edit operation by saving the new or edited data on the data source.
If you have implemented bulk row fetching, you cannot call Update. This will result in a failed assertion. Although class CRecordset does not provide a mechanism for updating bulk rows of data, you can write your own functions by using the ODBC API function SQLSetPos. For more information about bulk row fetching, see the article Recordset: Fetching Records in Bulk (ODBC).
Both AddNew and Edit prepare an edit buffer in which the added or edited data is placed for saving to the data source. Update saves the data. Only those fields marked or detected as changed are updated.
If the data source supports transactions, you can make the Update call (and its corresponding AddNew or Edit call) part of a transaction. For more information about transactions, see the article Transaction (ODBC).
If you call Update without first calling either AddNew or Edit, Update throws a CDBException. If you call AddNew or Edit, you must call Update before you call a Move operation or before you close either the recordset or the data source connection. Otherwise, your changes are lost without notification.
For details on handling Update failures, see the article Recordset: How Recordsets Update Records (ODBC).
See the article Transaction: Performing a Transaction in a Recordset (ODBC).