Wednesday, May 13, 2009

TClientDataSet::AppendData and TClientDataSet::BeforeGetRecords

TClientDataSet::AppendData
Adds a newly fetched packet of records to those already stored in the client dataset.
void __fastcall AppendData(const System::OleVariant &Data, bool HitEOF);


Description


Use AppendData to add a newly fetched packet of records from the server application to the client dataset. Data indicates the packet of records to add. HitEOF indicates whether or not the application server encountered the end of the dataset when it fetched the records from the database server.

Most applications call GetNextPacket instead to fetch a packet of records and automatically add them to those already available. Use AppendData when fetching data packets directly from the application server rather than letting the client dataset fetch data.

TClientDataSet::BeforeGetRecords
Occurs before the client dataset fetches a data packet from the application server.

__property TRemoteEvent BeforeGetRecords = {read=FBeforeGetRecords, write=FBeforeGetRecords};

Description
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 remote 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:

1.The client dataset receives a BeforeGetRecords event, where it can encode custom information into an OleVariant that is passed to the application server as the OwnerData parameter.
2.The provider on the application server receives a BeforeGetRecords event, where it can respond to or change that information before the provider 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


Кения сафари, противомалярийные таблетки, индивидуальный тур, тур экономическим, бюджетным Сафари , Вопрос Кении Сафари, пляжный отдых,
Kenya Affordable Safaris

No comments:

Post a Comment