RAD Studio |  |

Using Batch Updates
See Also
Collapse All

One approach for caching updates is to connect the ADO dataset to a client dataset using a dataset provider. This approach is discussed in Using a client dataset to cache updates.

However, ADO dataset components provide their own support for cached updates, which they call batch updates. The following table lists the correspondences between caching updates using a client dataset and using the batch updates features:

Comparison of ADO and client dataset cached updates

ADO dataset | TClientDataSet | Description
LockType | Not used: client datasets always cache updates | Specifies whether the dataset is opened in batch update mode.
CursorType | Not used: client datasets always work with an in-memory snapshot of data | Specifies how isolated the ADO dataset is from changes on the server.
RecordStatus | UpdateStatus | Indicates what update, if any, has occurred on the current row. RecordStatus provides more information than UpdateStatus.
FilterGroup | StatusFilter | Specifies which type of records are available. FilterGroup provides a wider variety of information.
UpdateBatch | ApplyUpdates | Applies the cached updates back to the database server. Unlike ApplyUpdates, UpdateBatch lets you limit the types of updates to be applied.
CancelBatch | CancelUpdates | Discards pending updates, reverting to the original values. Unlike CancelUpdates, CancelBatch lets you limit the types of updates to be canceled.

Using the batch updates features of ADO dataset components is a matter of:

- Opening the dataset in batch update mode
- Inspecting the update status of individual rows
- Filtering multiple rows based on update status
- Applying the batch updates to base tables
- Canceling batch updates

See Also

Connecting an ADO Dataset to a Data Store

Working with Record Sets

Fetching Records Asynchronously

Loading Data from and Saving Data to Files

Filtering Records Based On Bookmarks

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