IRepositoryScriptManager.Driver

Syntax

Driver: RepositoryDriverType;

Description

The Driver property determines a driver used to work with repository.

Example #1

Executing the example requires the ORCL server named Test. The "TestSchema" scheme is created on the server. The root of disk C contains the current.rm4 file that includes the script for repository creating.

Sub Main;

Var

Rsm: IRepositoryScriptManager;

Driv: IDalDriver;

ConDesc: IDalConnectionDescriptor;

Params: IDalConnectionDescriptorParams;

Con: IDalConnection;

Begin

//Connection to the scheme on the ORCL8 server

Driv := New DalOrcl8Driver.Create As IDalDriver;

ConDesc := Driv.CreateDescriptor;

Params := ConDesc.Params;

Params.Find("User Name").Value := "TestSchema";

Params.Find("Password").Value := "TestSchema";

Params.Find("Host BSTR").Value := "Test";

Params.Find("Scheme").Value := "TestSchema";

Con := ConDesc.CreateConnection;

//Settings of the repository manager

Rsm := New RepositoryScriptManager.Create;

Rsm.Connection := Con;

Rsm.Driver := RepositoryDriverType.ORCL8;

Rsm.Operation := RepositoryOperationType.Create;

Rsm.Repository := RepositoryType.Metabase;

Rsm.LoadScript(New FileStream.Create("c:\Current.rm4", FileOpenMode.Read, FileShare.Exclusive));

Rsm.Execute(Null);

End Sub Main;

After executing the example, a new platform repository will be created on the Test server in the TestSchema scheme.

Example #2

Executing the example requires a MSSQL server named Test. There is the TestSchema database on the server. The root of disk C contains the current.rm4 file that includes the script for repository creating.

Sub Main;

Var

Rsm: IRepositoryScriptManager;

Driv: IDalDriver;

ConDesc: IDalConnectionDescriptor;

Params: IDalConnectionDescriptorParams;

Con: IDalConnection;

Begin

//Connecting to the scheme on the MSSQL server

Driv := New DalMsSql2008Driver.Create As IDalDriver;

ConDesc := Driv.CreateDescriptor;

Params := ConDesc.Params;

Params.Find("User Name").Value := "TestSchema";

Params.Find("Password").Value := "TestSchema";

Params.Find("Host BSTR").Value := "Test";

Params.Find("Database").Value := "TestSchema";

Con := ConDesc.CreateConnection;

//Settings of the repository manager

Rsm := New RepositoryScriptManager.Create;

Rsm.Connection := Con;

Rsm.Driver := RepositoryDriverType.MSSQL2008;

Rsm.Operation := RepositoryOperationType.Create;

Rsm.Repository := RepositoryType.Metabase;

Rsm.Unicode := True;

Rsm.LoadScript(New FileStream.Create("c:\current.rm4", FileOpenMode.Read, FileShare.Exclusive));

Rsm.Execute(Null);

End Sub Main;

After executing the example a unicode version of the. Analytics Platform task scheduler.

See also:

IRepositoryScriptManager