Datasnap.DBClient.TClientDataSet

From RAD Studio API Documentation
Jump to: navigation, search

Datasnap.DBClient.TCustomClientDataSetData.DB.TDataSetSystem.Classes.TComponentSystem.Classes.TPersistentSystem.TObjectTClientDataSet

Delphi

TClientDataSet = class(TCustomClientDataSet)

C++

class PASCALIMPLEMENTATION TClientDataSet : public TCustomClientDataSet

Properties

Type Visibility Source Unit Parent
class public
Datasnap.DBClient.pas
Datasnap.DBClient.hpp
Datasnap.DBClient Datasnap.DBClient

Description

TClientDataSet implements a database-independent dataset.

TClientDataSet represents an in-memory dataset. A client dataset can be used as:

  • A fully functional, stand-alone, file-based dataset for single-tiered database applications. When used in this manner, the client dataset represents the data stored in a dedicated file on the user's hard disk.
  • A local in-memory buffer of the records from another dataset. The other (source) dataset can reside in the same form or data module as the client dataset (for example, when the client dataset provides navigation and editing support for the data from a unidirectional dataset). The source dataset can also reside on a separate system when the client dataset supports the client portion of a multitiered database application.
Note: The two functions described above are not mutually exclusive. An application can be designed to support the option of working with data offline, using the "briefcase" model. On site, the application uses TClientDataSet to communicate with the database server associated with a source dataset. When a user works off site, the client dataset writes a snapshot of the data to the hard disk. The application works with this snapshot off site, with the client dataset acting as a file-based dataset in a single-tiered application.
Note: For the current version of RAD Studio, when using TClientDataSet, deploying Midas.dll with the application is not necessary if you have MidasLib added to your uses clause. For more information, see Understanding Multi-tiered Database Applications.

When a client dataset represents the data from another dataset, it communicates with that dataset through a dataset provider. The client dataset communicates with this provider through the IAppServer interface. When the provider is in the same form or data module as the client dataset, the IAppServer interface is implemented by a hidden object that is created for you. When used in a client application as part of a multitiered application, the client dataset passes all calls to the provider through a remote data module's IAppServer interface.

See Also

Code Examples