DriverId: String;
The DriverId property determines the identifier of a database driver.
The identifier is specified depending on the DBMS type use at the server. The summary list of the identifiers that can be specified in this property is given in the Supported DBMS subsection.
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: