Opening and Closing Tables
|
Previous Top Next |
1. | Place TABSDatabase and TABSTable components from the Absolute DB page of the Component palette to a data module or on a form, if you have not already done it.
|
2. | Set up TABSDatabase component. Set the TABSDatabase.DatabaseName of the component to a unique value that will be used later to identify the database. Set the TABSDatabase.DatabaseFileName property to the name of the existing or new database file, if you have not already done it.
|
3. | Set up TABSTable component. Set the TABSTable.DatabaseName property from the drop-down list of available TABSDatabase components. Set the TABSTable.TableName property to the name of the table to create, if you have not already done it.
|
4. | Set additional TABSTable properties (optional). Set ReadOnly, InMemory, Exclusive properties of TABSTable component.
|
5. | Connect to a database (optional).
|
· | Set the Active property of the table to True, either at design time in the Object Inspector, or in code at runtime: ABSTable1.Active := True;
|
· | Call the Open method for the table at runtime, ABSTable1.Open;
|
· | Set the Active property of the table to False, either at design time in the Object Inspector, or in code at runtime, ABSTable1.Active := False;
|
· | Call the Close method for the dataset at runtime, ABSTable1.Close;
|