BOOL Rollback( );
Return Value
Nonzero if the transaction was successfully reversed; otherwise 0. If a Rollback call fails, the data source and transaction states are undefined. If Rollback returns 0, you must check the data source to determine its state.
Remarks
Call this member function to reverse the changes made during a transaction. All CRecordset AddNew, Edit, Delete, and Update calls executed since the last BeginTrans are rolled back to the state that existed at the time of that call.
After a call to Rollback, the transaction is over, and you must call BeginTrans again for another transaction. The record that was current before you called BeginTrans becomes the current record again after Rollback.
After a rollback, the record that was current before the rollback remains current. For details about the state of the recordset and the data source after a rollback, see the article Transaction (ODBC) in Visual C++ Programmer's Guide.
Example
See the article Transaction: Performing a Transaction in a Recordset (ODBC) in Visual C++ Programmer's Guide.
CDatabase Overview | Class Members | Hierarchy Chart
See Also CDatabase::BeginTrans, CDatabase::CommitTrans