IBDAC

TMemDataSet.ApplyUpdates Method

Writes dataset's pending cached updates to a database.

Class

TMemDataSet

Syntax

procedure ApplyUpdates; overload; virtual;

Remarks

Call the ApplyUpdates method to write a dataset's pending cached updates to a database. This method passes cached data to the database, but the changes are not committed to the database if there is an active transaction. An application must explicitly call the database component's Commit method to commit the changes to the database if the write is successful, or call the database's Rollback method to undo the changes if there is an error.

Following a successful write to the database, and following a successful call to a connection's Commit method, an application should call the CommitUpdates method to clear the cached update buffer.

Note: The preferred method for updating datasets is to call a connection component's ApplyUpdates method rather than to call each individual dataset's ApplyUpdates method. The connection component's ApplyUpdates method takes care of committing and rolling back transactions and clearing the cache when the operation is successful.

See Also

© 1997-2022 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback