From RAD Studio API Documentation
Jump to: navigation, search


property BeforeExecute: TRemoteEvent read FBeforeExecute write FBeforeExecute;


__property Datasnap::Dbclient::TRemoteEvent BeforeExecute = {read=FBeforeExecute, write=FBeforeExecute};


Type Visibility Source Unit Parent
event protected
Datasnap.Provider TCustomProvider


Occurs before the provider passes an execute command to its dataset.

Write a BeforeExecute event handler to respond to custom information from a client dataset before executing a query or stored procedure. Any parameter values supplied by the client dataset with the Execute command are applied before this event.

BeforeExecute is part of the mechanism by which a provider and a client dataset communicate information when executing queries or stored procedures that do not return cursors. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset's Execute method is called, the following events occur:

1.The client dataset receives a BeforeExecute event, where it can encode custom information into an OleVariant.

2.The provider receives a BeforeExecute event, where the OleVariant from the client dataset appears as the OwnerData parameter. The provider can respond to or change that information before passing the execute command on to its dataset.

3.The provider dispatches its Execute method to execute a query or stored procedure.

4.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.

5.The client dataset receives an AfterExecute event, where it can respond to the custom information returned by the provider in its AfterExecute event handler.

BeforeApplyUpdates is of type Datasnap.DBClient.TRemoteEvent.

See Also