Canceling Updates to the Current Record
Go Up to Canceling Pending Cached Updates
RevertRecord
restores the current record in the dataset to the state it was in when the table was opened, cached updates were last enabled, or updates were last successfully applied. It is most frequently used in an OnUpdateError
event handler to correct error situations. For example,
CustomersTable.RevertRecord;
Undoing cached changes to one record does not affect any other records. If only one record is in the cache of updates and the change is undone using RevertRecord
, the UpdatesPending
property for the dataset component is automatically changed from True
to False
.
If the record is not modified, this call has no effect. For more information about creating an OnUpdateError
handler, see Creating an OnUpdateRecord Event Handler.