Bde.DBTables.TDBDataSet.OpenDatabase
Delphi
function OpenDatabase: TDatabase;
C++
TDatabase* __fastcall OpenDatabase();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Bde.DBTables.pas Bde.DBTables.hpp |
Bde.DBTables | TDBDataSet |
Description
Opens the database that contains the dataset.
Call OpenDatabase to connect to the database that contains the dataset, or to create a temporary database component and connect to a database. The DatabaseName property specifies the database to open.
OpenDatabase makes the current session active, then determines whether the DatabaseName property corresponds to the DatabaseName property of an existing database component. If it does not, OpenDatabase creates a temporary database component, assigning the DatabaseName parameter to the DatabaseName property. Finally, OpenDatabase calls the Open method of the database to connect to a database server, then increments the session's database reference count by one.