Bde.DBTables.TBDEDataSet.CachedUpdates

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property CachedUpdates: Boolean read FCachedUpdates write SetCachedUpdates default False;

C++

__property bool CachedUpdates = {read=FCachedUpdates, write=SetCachedUpdates, default=0};

Properties

Type Visibility Source Unit Parent
property published
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TBDEDataSet

Description

Specifies whether cached updates are enabled for a dataset.

CachedUpdates enables or disables the use of cached updates for a dataset. If CachedUpdates is true, cached updates are enabled. If CachedUpdates is false, cached updates are disabled.

When cached updates are enabled, updates to a dataset (such as posting changes, inserting new records, or deleting records), are stored in an internal cache on the client machine instead of being written directly to the dataset's underlying database tables. When changes are complete, an application writes all cached changes to the database in the context of a single transaction.

Cached updates are most useful to client applications in two-tiered applications. The main benefits of enabling cached updates are:

Fewer transactions and shorter transaction times.

Minimization of network traffic.

The potential drawbacks of enabling cached updates are:

Other applications can access and change the actual data on the server while users are editing local copies of the data, resulting in an update conflict when cached updates are applied to the database.

Other applications cannot access data changes made by an application until its cached updates are applied to the database.

Note: Instead of using cached updates, applications can obtain the same benefits with greater control by using a client dataset and a provider component.

Note: When cached updates are enabled, data changes are stored in local memory. The storage medium is a Paradox format in-memory table. This has implications for applications run in a network environment in that the NET DIR parameter for the Borland Database Engine (BDE) driver for Paradox needs to be set -- even though the application may be designed to use other database types. Failure to properly set this parameter can result in an EDBEngineError exception. There are two ways to set NET DIR. One is through the BDE configuration utility BDE Administrator (described in the BDE Administrator online help). The other way is through the NetFileDir property of TSession.

See Also