Discarding Pending Cached Updates

From InterBase
Jump to: navigation, search

CancelUpdates clears the cache of all pending updates, and restores the dataset to the state it was in when the table was opened, cached updates were last enabled, or updates were last successfully applied. For example, the following statement cancels updates for the CustomersTable:

CustomersTable.CancelUpdates;

From the update cache, deleted records are undeleted, modified records revert to original values, and newly inserted records simply disappear.

Note: Calling CancelUpdates does not disable cached updating. It only cancels currently pending updates. To disable further cached updates, set the CachedUpdates property to False.