RAD Studio
ContentsIndex
PreviousUpNext
Enabling BDE-based Cached Updates

To use the BDE for cached updates, the BDE-enabled dataset must indicate that it should cache updates. This is specified by setting the CachedUpdates property to True. When you enable cached updates, a copy of all records is cached in local memory. Users view and edit this local copy of data. Changes, insertions, and deletions are also cached in memory. They accumulate in memory until the application applies those changes to the database server. If changed records are successfully applied to the database, the record of those changes are freed in the cache. 

The dataset caches all updates until you set CachedUpdates to False. Applying cached updates does not disable further cached updates; it only writes the current set of changes to the database and clears them from memory. Canceling the updates by calling CancelUpdates removes all the changes currently in the cache, but does not stop the dataset from caching any subsequent changes.

Note: If you disable cached updates by setting CachedUpdates to False, any pending changes that you have not yet applied are discarded without notification. To prevent losing changes, test the UpdatesPending property before disabling cached updates.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!