IDatabase.DriverId

Syntax

DriverId: String;

Description

The DriverId property determines the identifier of a database driver.

Comments

The identifier is specified depending on the DBMS type use at the server. The list of the identifiers that can be specified in this property is given in the Summary List of Identifiers section.

Example

Executing the example requires a Microsoft Access database file named db1.mdb.

Sub Main;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    MObj: IMetabaseObject;
    DB: IDatabase;
Begin
    MB := MetabaseClass.Active;
        CrInfo := MB.CreateCreateInfo;
        CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_DATABASE;
        CrInfo.Id := "MSACCESS_DB";
        CrInfo.Name := "New database";
        CrInfo.Parent := MB.Root;
    MObj := MB.CreateObject(CrInfo).Edit;
    DB := MObj As IDatabase;
    DB.Authentication := AuthenticationMode.Password;
    DB.DriverId := "OLEDB";
    DB.LogonData.ParamValue("FILENAME") := "c:\db1.mdb";
    MObj.Save;
End Sub Main;

After executing the example a new database is created in repository root. The database will be used to connect to the Microsoft Access database file with the specified name.

See also:

IDatabase