Datasnap.DBClient.TClientDataSet.BeforeApplyUpdates
Delphi
property BeforeApplyUpdates: TRemoteEvent read FBeforeApplyUpdates write FBeforeApplyUpdates;
C++
__property BeforeApplyUpdates;
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| event | published | Datasnap.DBClient.pas Datasnap.DBClient.hpp |
Datasnap.DBClient | TClientDataSet |
Description
Occurs before the client dataset applies updates to the remote server. {{#multireplace:Datasnap.DBClient.TClientDataSet.BeforeApplyUpdates|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} inherits from {{#multireplace:Datasnap.DBClient.TCustomClientDataSet.BeforeApplyUpdates|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}. All content below this line refers to {{#multireplace:Datasnap.DBClient.TCustomClientDataSet.BeforeApplyUpdates|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}.
Occurs before the client dataset applies updates to the remote server.
Write a BeforeApplyUpdates event handler to send custom information to the client dataset's provider. BeforeApplyUpdates is part of the mechanism by which a client dataset and a provider communicate information about updates. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.
When the application calls the client dataset's ApplyUpdates method, the following events occur:
- The client dataset receives a BeforeApplyUpdates event, where it can encode custom information into an OleVariant that is passed to the provider as the
OwnerDataparameter. - The provider receives a BeforeApplyUpdates event, where it can respond to or change that information before it applies the updates.
- The provider applies the updates and receives an OnUpdateError event for any problem records.
- The provider receives an AfterApplyUpdates event, where it can encode custom information into its
OwnerDataparameter or respond to information from the BeforeApplyUpdates event handler. - The client dataset receives an AfterApplyUpdates event, where it can respond to the custom information returned by the provider's AfterApplyUpdates event handler.
BeforeApplyUpdates is an event handler of type Datasnap.DBClient.TRemoteEvent.