From RAD Studio API Documentation
Jump to: navigation, search



TDataSet = class(TComponent, {$IFNDEF NEXTGEN}IProviderSupport,{$ENDIF !NEXTGEN} IProviderSupportNG)


class PASCALIMPLEMENTATION TDataSet : public System::Classes::TComponent


Type Visibility Source Unit Parent
class public
Data.DB Data.DB


TDataSet is the base class for all dataset components that represent data in rows and columns.

TDataSet introduces the basic properties, events, and methods for working with data.

Many of these properties, events, and methods are abstract (Delphi) or pure virtual (C++) in TDataSet. Abstract or pure virtual declarations are declarations without implementations. At the TDataSet level they cannot be used or accessed. Developers must use or derive descendants of TDataSet that redeclare and implement these abstract or pure virtual methods. Many of the other TDataSet methods are declared and implemented in TDataSet as virtual methods, but the implementations are merely stubs that are reimplemented in descendants.

TDataSet has several descendants: Data.Win.ADODB.TCustomADODataSet, IBX.IBCustomDataSet.TIBCustomDataSet, Data.SqlExpr.TCustomSQLDataSet, and Datasnap.DBClient.TCustomClientDataSet.

TCustomADODataSet is the base class for datasets that access their data using ActiveX Data Objects (ADO). TCustomADODataSet descendants include Data.Win.ADODB.TADODataSet, Data.Win.ADODB.TADOTable, Data.Win.ADODB.TADOQuery, and Data.Win.ADODB.TADOStoredProc. Developers who create custom dataset components that use ADO derive them from TCustomADODataSet.

TIBCustomDataSet is the base class for datasets that directly access the data in InterBase tables. TIBCustomDataSet descendants include IBX.IBCustomDataSet.TIBDataSet, IBX.IBTable.TIBTable, IBX.IBQuery.TIBQuery, and IBX.IBStoredProc.TIBStoredProc. Developers who create custom dataset components that directly access data in an InterBase database derive them from TIBCustomDataSet.

TCustomSQLDataSet is the base class for unidirectional datasets. Unidirectional datasets are read-only datasets that permit only forward navigation. TCustomSQLDataSet descendants include the dbExpress datasets Data.SqlExpr.TSQLDataSet, Data.SqlExpr.TSQLQuery, Data.SqlExpr.TSQLTable, and Data.SqlExpr.TSQLStoredProc. Developers who create custom dataset components that use dbExpress to access their data derive them from TCustomSQLDataSet.

TCustomClientDataSet is the base class for in-memory datasets. Client datasets can work with data from files on disk or with data provided by another component via a provider. They cache that data in memory, maintain a record of any changes in a change log, and apply cached updates at a later point back to the source of the data. Developers who create custom datasets that store their data in an in-memory cache derive them from TCustomClientDataSet.

Developers can also derive custom dataset components directly from TDataSet, providing their own mechanisms for accessing and manipulating the data.

See Also