TdxEMFDataProviderOptions.DBEngine Property
Specifies a target database engine by its name.
Declaration
property DBEngine: TdxDBEngine read; write;
Property Value
Type |
---|
TdxDBEngine |
Remarks
You can assign any TdxDBEngines class’s public constant to this property. Assigning the TdxDBEngines.Unknown or TdxDBEngines.Empty string causes the data provider to determine the engine type from its connection settings (see TdxEMFFireDACDataProvider.Connection or TdxEMFADODataProvider.Connection).
At design time, the DBEngine property provides a drop-down list populated with supported database engines. Selecting a database engine from the drop-down list automatically adds a unit with a corresponding SQL connection provider used internally to build engine-specific queries. Specifying the DBEngine property in code requires that you manually add this unit to the ‘uses’ clause in your project. Use the following table for reference.
Database Engine Type | SQL Connection Provider Unit |
---|---|
TdxDBEngines.Firebird | dxEMF.DB.Firebird |
TdxDBEngines.MSAccess | dxEMF.DB.MSAccess |
TdxDBEngines.MSSQL | dxEMF.DB.MSSQL |
TdxDBEngines.MySQL | dxEMF.DB.MySQL |
TdxDBEngines.Oracle | dxEMF.DB.Oracle |
TdxDBEngines.SQLite | dxEMF.DB.SQLite |
The following code snippet uses the DBEngine property to select an SQLite database as a target database for a dataProvider. Note that to allow the ExpressEntityMapping Framework to access this database, you also need to add the dxEMF.DB.SQLite unit to the project’s ‘uses’ clause.
dataProvider.Options.DBEngine := TdxDBEngines.SQLite;