Opening and closing a table

From InterBase
Jump to: navigation, search

Go Up to Setting up a table component


To view and edit a table’s data in a data-aware control such as TDBGrid, open the table. There are two ways to open a table. You can set its Active property to True, or you can call its Open method. Opening a table puts it into dsBrowse state and displays data in any active controls associated with the table’s data source.

To end display and editing of data, or to change the values for a table component’s fundamental properties (for example: Database, TableName, and TableType), first post or discard any pending changes. If cached updates are enabled, call the ApplyUpdates method to write the posted changes to the database. Finally, close the table.

There are two ways to close a table. You can set its Active property to False, or you can call its Close method. Closing a table puts the table into dsInactive state. Active controls associated with the table’s data source are cleared.

Advance To: