Datasnap.DBClient.TCustomClientDataSet.BeforeGetRecords
Delphi
property BeforeGetRecords: TRemoteEvent read FBeforeGetRecords write FBeforeGetRecords;
C++
__property TRemoteEvent BeforeGetRecords = {read=FBeforeGetRecords, write=FBeforeGetRecords};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | protected | Datasnap.DBClient.pas Datasnap.DBClient.hpp |
Datasnap.DBClient | TCustomClientDataSet |
Description
Occurs before the client dataset fetches a data packet from the provider.
Write a BeforeGetRecords event handler to send custom information to the client dataset's provider. BeforeGetRecords 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 data from the application server, the following events occur:
- The client dataset receives a BeforeGetRecords event, where it can encode custom information into an OleVariant that is passed to the provider as the
OwnerData
parameter. - The provider receives a BeforeGetRecords event, where it can respond to or change that information before it creates a data packet.
- The provider generates the data packet.
- The provider receives an AfterGetRecords event, where it can encode custom information into its
OwnerData
parameter or respond to information from the BeforeGetRecords event handler. - The client dataset receives an AfterGetRecords event, where it can respond to the custom information returned by the provider's AfterGetRecords event handler.
BeforeGetRecords is an event handler of type Datasnap.DBClient.TRemoteEvent.
See Also