Datasnap.DBClient.TCustomClientDataSet.BeforeRowRequest
Delphi
property BeforeRowRequest: TRemoteEvent read FBeforeRowRequest write FBeforeRowRequest;
C++
__property TRemoteEvent BeforeRowRequest = {read=FBeforeRowRequest, write=FBeforeRowRequest};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | protected | Datasnap.DBClient.pas Datasnap.DBClient.hpp |
Datasnap.DBClient | TCustomClientDataSet |
Description
Occurs before the client dataset fetches new information about the current record.
Write a BeforeRowRequest event handler to send custom information to the client dataset's provider. BeforeRowRequest is part of the mechanism by which a client dataset and a provider communicate information about data fetching. 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 client dataset fetches detail information about the current record or refreshes the current record, the following events occur:
- The client dataset receives a BeforeRowRequest event, where it can encode custom information into an OleVariant that is passed to the provider as the
OwnerData
parameter. - The provider on the application server receives a BeforeRowRequest event, where it can respond to or change that information before it looks up the requested information.
- The provider creates a delta packet that contains the requested information.
- The provider receives an AfterRowRequest event, where it can encode custom information into its
OwnerData
parameter or respond to information from the BeforeRowRequest event handler. - The client dataset receives an AfterRowRequest event, where it can respond to the custom information returned by the provider's AfterRowRequest event handler.
BeforeRowRequest is an event handler of type Datasnap.DBClient.TRemoteEvent.