SimpleDS.TSimpleDataSet.BeforeExecute
Delphi
property BeforeExecute: TRemoteEvent read FBeforeExecute write FBeforeExecute;
C++
__property BeforeExecute;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | SimpleDS.pas SimpleDS.hpp |
SimpleDS | TSimpleDataSet |
Description
Occurs before the client dataset executes the provider's query or stored procedure.
SimpleDS.TSimpleDataSet.BeforeExecute inherits from Datasnap.DBClient.TCustomClientDataSet.BeforeExecute. All content below this line refers to Datasnap.DBClient.TCustomClientDataSet.BeforeExecute.
Occurs before the client dataset executes the provider's query or stored procedure.
Write a BeforeExecute event handler to send custom information to the client dataset's provider. BeforeExecute is part of the mechanism by which a client dataset and a provider communicate information when explicitly executing an SQL command by the provider's dataset. 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 Execute method, the following events occur:
- The client dataset receives a BeforeExecute event, where it can encode custom information into an OleVariant that is passed to the provider as the
OwnerData
parameter. - The provider receives a BeforeExecute event, where it can respond to or change that information before it executes the query or stored procedure.
- The provider executes the appropriate command (either the command supplied by the CommandText property, or the command associated with a dataset such as a query or stored procedure).
- The provider receives an AfterExecute event, where it can encode custom information into its
OwnerData
parameter or respond to information from the BeforeExecute event handler. - The client dataset unpacks any output parameters from the provider into the Params property and then receives an AfterExecute event, where it can respond to the custom information returned by the provider's AfterExecute event handler.
BeforeExecute is an event handler of type Datasnap.DBClient.TRemoteEvent.