IRepositoryScriptManager.Connection

Syntax

Connection: Object;

Description

The Connection property determines connection with database server within which all operations take place.

Comments

As a value, specify the connection implemented by the ISecurityConnection, or IDalConnection interface.

Example #1

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

Add links to the Dal, Fore, IO system assemblies.

Sub UserProc;
Var
    Rsm: IRepositoryScriptManager;
    Driv: IDalDriver;
    ConDesc: IDalConnectionDescriptor;
    Params: IDalConnectionDescriptorParams;
    Con: IDalConnection;
Begin
    
//Connection to schema on the Oracle 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(
"Schema").Value := "TestSchema";
    Con := ConDesc.CreateConnection;
    
//Repository manager settings
    Rsm := New RepositoryScriptManager.Create;
    Rsm.Connection := Con;
    Rsm.Driver := RepositoryDriverType.ORCL9;
    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 UserProc;

After executing the example, a Unicode version of Foresight Analytics Platform will be created on the specified server in the specified schema.

See also:

IRepositoryScriptManager