Communicating with the Client Dataset

From RAD Studio
Jump to: navigation, search

Go Up to Using Provider Components Index


All communication between a provider and a client dataset or XML broker takes place through an Datasnap.Midas.IAppServer interface. If the provider is in the same application as the client, this interface is implemented by a hidden object generated automatically for you, or by a Datasnap.Win.TConnect.TLocalConnection component. If the provider is part of a multi-tiered application, this is the interface for the application server's remote data module or (in the case of a SOAP server) an interface generated by the connection component.

Most applications do not use IAppServer directly, but invoke it indirectly through the properties and methods of the client dataset or XML broker. However, when necessary, you can make direct calls to the IAppServer interface by using the AppServer property of a client dataset.

The following table lists the methods of the IAppServer interface, as well as the corresponding methods and events on the provider component and the client dataset. These IAppServer methods include a Provider parameter. In multi-tiered applications, this parameter indicates the provider on the application server with which the client dataset communicates. Most methods also include an OleVariant parameter called OwnerData that allows a client dataset and a provider to pass custom information back and forth. OwnerData is not used by default, but is passed to all event handlers so that you can write code that allows your provider to adjust to application-defined information before and after each call from a client dataset.

AppServer interface members:

IAppServer Provider Component TClientDataSet

AS_ApplyUpdates method

ApplyUpdates method, BeforeApplyUpdates event, AfterApplyUpdates event

ApplyUpdates method, BeforeApplyUpdates event, AfterApplyUpdates event.

AS_DataRequest method

DataRequest method, OnDataRequest event

DataRequest method.

AS_Execute method

Execute method, BeforeExecute event, AfterExecute event

Execute method, BeforeExecute event, AfterExecute event.

AS_GetParams method

GetParams method, BeforeGetParams event, AfterGetParams event.

FetchParams method, BeforeGetParams event, AfterGetParams event.

AS_GetProviderNames method

Used to identify all available providers.

Used to create a design-time list for ProviderName property.

AS_GetRecords method

GetRecords method, BeforeGetRecords event, AfterGetRecords event

GetNextPacket method, Data property, BeforeGetRecords event, AfterGetRecords event

AS_RowRequest method

RowRequest method, BeforeRowRequest event, AfterRowRequest event

FetchBlobs method, FetchDetails method, RefreshRecord method, BeforeRowRequest event, AfterRowRequest event


See Also

Code Examples