Specifies the TmySQLDatabase component this component connects to to perform database operations.
Syntax:
property Database: TMySQLDatabase;
Description:
Use Database property to access the connection and some other properties, events, and
methods of the database component associated with this dataset.
In design-time you may choose database from drop-down list for given MySQLTable or
MySQLQuery.
Since v2.7.1 DAC for MySQL tries to assign this property value to last added TmySQLDatabase component in design-time.
Example:
// Do a transaction
with MySQLTable1.Database do
begin
StartTransAction;
// transactions supporting depends on table's type.
// MyISAM tables (default type in MySQL) don't
// support transactions, InnoDB, Falcon and BDB tables do.
// Post some records with MySQLTable1
Commit;
end;