Responding to Client-generated Events

From RAD Studio
Jump to: navigation, search

Go Up to Using Provider Components Index

Provider components implement a general-purpose event that lets you create your own calls from client datasets directly to the provider. This is the OnDataRequest event.

OnDataRequest is not part of the normal functioning of the provider. It is simply a hook to allow your client datasets to communicate directly with providers. The event handler takes an OleVariant as an input parameter and returns an OleVariant. By using OleVariants, the interface is sufficiently general to accommodate almost any information you want to pass to or from the provider.

To generate an OnDataRequest event, the client application calls the DataRequest method of the client dataset.

See Also