Setting up a table component
Go Up to Working with Tables
The following steps are general instructions for setting up a table component at design time. There may be additional steps you need to tailor properties of a table to the requirements of your application.
To create a table component:
- Place a table component from the InterBase page of the Tool Palette in a data module or on a form, and set its
Nameproperty to a unique value appropriate to your application. - Set the
Databaseproperty to the name of the database component to access. - Set the
Transactionproperty to the name of the transaction component. - Set the
DatabaseNameproperty in the Database component to the name of a the database containing the table. - Set the
TableNameproperty to the name of the table in the database. You can select tables from the drop-down list if theDatabaseandTransactionproperties are already specified, and if theDatabaseandTransactioncomponents are connected to the server. - Place a data source component in the data module or on the form, and set its
DataSetproperty to the name of the table component. The data source component is used to pass a result set from the table to data-aware components for display.
To access the data encapsulated by a table component:
- Place a data source component from the Data Access page of the Tool Palette in the data module or form, and set its
DataSetproperty to the name of the table component. - Place a data-aware control, such as
TDBGrid, on a form, and set the control’sDataSourceproperty to the name of the data source component placed in the previous step. - Set the
Activeproperty of the table component toTrue.
- Tip: For more information about database components, see Connecting to Databases.