ADO » DataControl » CancelUpdate


Cancels a new row or all changes to the current row.

The CancelUpdate method is used to cancel and discard all pending changes made to the source recordset since the last Refresh or SubmitChange method call. This method resets the local cache containing the pending changes to empty.

Since ADO stores the data separate from the pending changes, you simply revert back to the previous set of data as it existed in the Recordset after the last update or call to Refresh.

You can use buttons on a Web page to navigate and manipulate a displayed recordset. For example, when the appropriate button is clicked, you can call a subroutine containing either this method or the SubmitChanges method.


Sub SubmitChange_OnClick
End Sub

Sub CancelUpdate_OnClick
End Sub

See Also: