Setting up a table component

From InterBase
Jump to: navigation, search

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:

  1. Place a table component from the InterBase page of the Tool Palette in a data module or on a form, and set its Name property to a unique value appropriate to your application.
  2. Set the Database property to the name of the database component to access.
  3. Set the Transaction property to the name of the transaction component.
  4. Set the DatabaseName property in the Database component to the name of a the database containing the table.
  5. Set the TableName property to the name of the table in the database. You can select tables from the drop-down list if the Database and Transaction properties are already specified, and if the Database and Transaction components are connected to the server.
  6. Place a data source component in the data module or on the form, and set its DataSet property 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:

  1. Place a data source component from the Data Access page of the Tool Palette in the data module or form, and set its DataSet property to the name of the table component.
  2. Place a data-aware control, such as TDBGrid, on a form, and set the control’s DataSource property to the name of the data source component placed in the previous step.
  3. Set the Active property of the table component to True.
Tip: For more information about database components, see Connecting to Databases.

Topics