Show: Delphi C++
Display Preferences

Using Table Type Datasets

From RAD Studio
Jump to: navigation, search

Go Up to Understanding Datasets Index


To use a table type dataset

  1. Place the appropriate dataset component in a data module or on a form, and set its Name property to a unique value appropriate to your application.
  2. Identify the database server that contains the table you want to use. Each table type dataset does this differently, but typically you specify a database connection component:
    • For TTable, specify a TDatabase component or a BDE alias using the DatabaseName property.
    • For TADOTable, specify a TADOConnection component using the Connection property.
    • For TSQLTable, specify a TSQLConnection component using the SQLConnection property.
    • For TIBDataSet, specify a TIBDatabase component using the database property.
  3. Set the TableName property to the name of the table in the database. You can select tables from a drop-down list if you have already identified a database connection component. For the TIBDataSet component, set the CommandText property to select data from the database table.
  4. Place a data source component in the data module or on the form, and set its DataSet property to the name of the dataset. The data source component is used to pass a result set from the dataset to data-aware components for display.

Advantages of using table type datasets

The main advantage of using table type datasets is the availability of indexes. Indexes enable your application to

In addition, the one-to-one relationship between table type datasets and database tables enables many of them to be used for

See Also

Personal tools
In other languages
Previous Versions
Assistance