Using Dataset Cached Updates
Go Up to Understanding Datasets
Cached updates enable you to retrieve data from a database, cache and edit it locally, and then apply the cached updates to the database as a unit. When cached updates are enabled, updates to a dataset (such as posting changes or deleting records) are stored in an internal cache instead of being written directly to the dataset’s underlying table. When changes are complete, your application calls a method that writes the cached changes to the database and clears the cache.
Implementation of cached updating occurs in TIBCustomDataSet
. The following table lists the properties, events, and methods for cached updating:
Property, event, or method | Purpose |
---|---|
|
Determines whether or not cached updates are in effect for the dataset. If True, cached updating is enabled. If False, cached updating is disabled. |
|
Indicates the name of the |
|
Indicates whether or not the local cache contains updated records that need to be applied to the database. True indicates there are records to update. False indicates the cache is empty. |
|
Indicates the kind of updated records to make visible to the application during the application of cached updates. |
|
Indicates if a record is unchanged, modified, inserted, or deleted. |
|
A developer-created procedure that handles update errors on a record-by-record basis. |
|
A developer-created procedure that processes updates on a record-by-record basis. |
|
Applies records in the local cache to the database. |
|
Removes all pending updates from the local cache without applying them to the database. |
|
Copies all database records to the local cache for editing and updating. |
|
Undoes updates to the current record if updates are not yet applied on the server side. |
Using cached updates and coordinating them with other applications that access data in a multi-user environment is an advanced topic that is fully covered in Working with Cached Updates.