DBClient.TCustomClientDataSet.SetProvider

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From DBClient.pas

	procedure SetProvider(Provider: TComponent);


Unit: DBClient

Type: method

Visibility: public

Member Of: TCustomClientDataSet

C++ Information

From DBClient.hpp

	void __fastcall SetProvider(Classes::TComponent * Provider);


Unit: DBClient

Type: method

Visibility: public

Member Of: TCustomClientDataSet

Description

Associates the client dataset with a provider in the same process space.


Use SetProvider to specify a local provider component that provides data to and applies updates from the client dataset. The client dataset communicates with this provider using the IAppServer interface specified by the AppServer property.

Do not call SetProvider if the client dataset already uses an internal provider component. Also, do not use SetProvider for remote providers on an application server. If the provider is not in the same process space as the client dataset, use the ProviderName property. If the provider has the same Owner as the client dataset, you can also use the ProviderName property.

The Provider parameter must be a descendant of TCustomProvider. Otherwise, SetProvider raises an exception.

Note:  If you close the client dataset after assigning a provider using the SetProvider method, when you reopen the client dataset you must call SetProvider again to reassign that provider.

See Also

Personal tools
Translations
Newest Version