|
Class TDAODatabase (unit DAODatabase) |
TComponent
TDAODatabase provides control over a connection to single database in a database application.
Use TDAODatabase when a database application requires any of the following control over a database connection:
| Functions |
procedure BeginTrans;
procedure Close;Call Close to set the Active property of a dataset to False. When Active is False, the dataset is closed; the dataset cannot read data from or write data to the database.
procedure CommitTrans;
procedure Execute(SQL: string);Call Execute to execute the INSERT, UPDATE, or DELETE statement without parameters.
procedure GetQueryDefNames(List: TStrings);
procedure GetTableIndexes(TableName: string; List: TStrings);
procedure GetTableNames(List: TStrings);
procedure Open;
Call Open to establish a connection to a database, specified by the DatabaseName property.
Setting Connected to True also connects to the database.
procedure Rollback;| Properties |
property Connected : Boolean
Set Connected to True to establish a database connection without opening a dataset.
Set Connected to False to close a database connection. An application can check Connected to determine
the current status of a database connection.
property CreateWorkspace : Boolean
property DatabaseName : string
property Exclusive : Boolean
Set Exclusive to True to define an exclusive access to a database.
Set Exclusive to False for common access.
property Password : string
property ReadOnly : Boolean
property Workspace : TWorkspace
property Datasets : TListUse DataSets to access active datasets associated with a database component. An active dataset is one that is currently open.
property RecordsAffected : IntegerThe returned value lays in an interval from 0 up to number of records, which were used by last call of method Execute for TDAODatabase.
| Variables |
_Database : Database;
_Workspace : Workspace;