TDataSet has several immediate descendants, each of which corresponds to a different data access mechanism. You do not work directly with any of these descendants. Rather, each descendant introduces the properties and methods for using a particular data access mechanism. These properties and methods are then exposed by descendant classes that are adapted to different types of server data. The immediate descendants of TDataSet include
- TBDEDataSet, which uses the Borland Database Engine (BDE) to communicate with the database server. The TBDEDataSet descendants you use are TTable, TQuery, TStoredProc, and TNestedTable. The unique features of BDE-enabled datasets are described in Using the Borland Database Engine
- TCustomADODataSet, which uses ActiveX Data Objects (ADO) to communicate with an OLEDB data store. The TCustomADODataSet descendants you use are TADODataSet, TADOTable, TADOQuery, and TADOStoredProc. The unique features of ADO-based datasets are described in Working with ADO components.
- TCustomSQLDataSet, which uses dbExpress to communicate with a database server. The TCustomSQLDataSet descendants you use are TSQLDataSet, TSQLTable, TSQLQuery, and TSQLStoredProc. The unique features of dbExpress datasets are described in Using Unidirectional Datasets.
- TIBCustomDataSet, which communicates directly with an InterBase database server. The TIBCustomDataSet descendants you use are TIBDataSet, TIBTable, TIBQuery, and TIBStoredProc.
- TCustomClientDataSet, which represents the data from another dataset component or the data from a dedicated file on disk. The TCustomClientDataSet descendants you use are TClientDataSet, which can connect to an external (source) dataset, and the client datasets that are specialized to a particular data access mechanism (TBDEClientDataSet,TSimpleDataSet, and TIBClientDataSet), which use an internal source dataset. The unique features of client datasets are described in Using client datasets
Some pros and cons of the various data access mechanisms employed by these
TDataSet descendants are described in
Using databases.
In addition to the built-in datasets, you can create your own custom TDataSet descendants—for example to supply data from a process other than a database server, such as a spreadsheet. Writing custom datasets allows you the flexibility of managing the data using any method you choose, while still letting you use the VCL data controls to build your user interface. For more information about creating custom components, see Overview of component creation.
Although each TDataSet descendant has its own unique properties and methods, some of the properties and methods introduced by descendant classes are the same as those introduced by other descendant classes that use another data access mechanism. For example, there are similarities between the "table" components (TTable, TADOTable, TSQLTable, and TIBTable). For information about the commonalities introduced by TDataSet descendants, see Types of datasets.