Show: Delphi C++
Display Preferences

Datasnap.Provider.TCustomProvider.BeforeGetRecords

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property BeforeGetRecords: TRemoteEvent read FBeforeGetRecords write FBeforeGetRecords;

C++

__property Datasnap::Dbclient::TRemoteEvent BeforeGetRecords = {read=FBeforeGetRecords, write=FBeforeGetRecords};

Properties

Type Visibility Source Unit Parent
event protected
Datasnap.Provider.pas
Datasnap.Provider.hpp
Datasnap.Provider TCustomProvider

Description

Occurs before the provider creates a data packet and sends it to a client dataset.

Write a BeforeGetRecords event handler to respond to custom information from a client dataset. BeforeGetRecords is part of the mechanism by which a provider and a client dataset communicate information about data fetching. 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 fetches data from the provider, the following events occur:

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

2.The provider receives a BeforeGetRecords event, where the OleVariant from the client dataset appears as the OwnerData parameter. The provider can respond to or change that information before it creates a data packet.

3.The provider generates the data packet.

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

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

BeforeGetRecords is of type Datasnap.DBClient.TRemoteEvent.

See Also


Code Examples

Personal tools
In Other Languages
Previous Versions
Assistance