Datasnap.DBClient.TCustomClientDataSet.AfterExecute

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property AfterExecute: TRemoteEvent read FAfterExecute write FAfterExecute;

C++

__property TRemoteEvent AfterExecute = {read=FAfterExecute, write=FAfterExecute};

Properties

Type Visibility Source Unit Parent
event protected
Datasnap.DBClient.pas
Datasnap.DBClient.hpp
Datasnap.DBClient TCustomClientDataSet

Description

Occurs after the client dataset receives the results from an execute command.

Write an AfterExecute event handler to respond to custom information returned to the client dataset from a provider's AfterExecute event handler. AfterExecute is part of the mechanism by which a client dataset and a provider communicate information when executing an SQL command from the client. 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:

  1. 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.
  2. The provider receives a BeforeExecute event, where it can respond to or change that information before it executes the query or stored procedure.
  3. 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).
  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 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.

AfterExecute is an event handler of type Datasnap.DBClient.TRemoteEvent.

See Also