RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseProvider Class

TBaseProvider is a base class for all providers that represent the data in a dataset.

Pascal
TBaseProvider = class(TCustomProvider);
C++
class TBaseProvider : public TCustomProvider;

Provider

TBaseProvider is the immediate ancestor of TDataSetProvider, which provides data from any dataset and applies updates back to that dataset or directly to an SQL server. Use TBaseProvider to derive other customized data provider objects, such as providers that apply updates directly to a database without using SQL. 

Unlike its immediate ancestor (TCustomProvider) TBaseProvider includes no abstract (Delphi) or pure virtual (C++) methods. However, applications should not create instances of TBaseProvider, as many of the methods are merely stubs that provide a backstop for specialized descendants that do not implement all the provider methods. To add a provider component to a form or data module, use TDataSetProvider (or TXMLTransformProvider). 

A provider derived from TBaseProvider is an intermediate link between a TClientDataSet or TXMLBroker object and a source dataset. The source dataset can reside in the same application as the client dataset or XML broker, or it can be part of a separate application server. The provider packages data from the source dataset and passes it in one or more transportable data packets to the client dataset or XML broker. The client dataset reconstructs the data in the data packet to create a local, in-memory copy for user access. When user access is complete, the client dataset repackages any changed data and sends the updates back to the provider. The provider applies the updates to the database or source dataset.  

When the provider supplies data to a client dataset, the client dataset reconstructs the data in the data packet to create a local, in-memory copy for user access. When user access is complete, the client dataset repackages any changed data and sends the updates back to the provider. The provider applies the updates to the database or source dataset.  

When the provider supplies data to an XML broker, the XML broker adds the data packet, in XML format, to an HTML document that is downloaded by a Web client. When the XML broker receives updates from the Web client, it sends the updates to the provider, which applies them to the database or source dataset.  

Client datasets and XML brokers communicate with a provider through the IAppServer interface. In multi-tiered applications, this is the interface of the remote data module that contains the provider. To enable the remote data module to pass calls to the provider, the provider's Exported property must be true, and its Owner property must specify the remote data module. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!