IRepositoryScriptManager.Repository

Syntax

Repository: RepositoryType;

Description

The Repository property determines the repository type, for which it is necessary to perform the specified operation.

Example

Executing the example requires the ORCL server named Test. Platform repository was created within the TestSchema scheme on the server. The root of disk C contains the "current.rm4" and "current_rds.rm4" files that includes the script used to create and update the repository and MDM repository.

Sub Main;

Var

Rsm: IRepositoryScriptManager;

Driv: IDalDriver;

ConDesc: IDalConnectionDescriptor;

Params: IDalConnectionDescriptorParams;

Con: IDalConnection;

Begin

//Connection to the scheme on the ORCL server

Driv := New DalOrclDriver.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.ORCL;

Rsm.Operation := RepositoryOperationType.Update;

//Repository updating

Rsm.Repository := RepositoryType.Metabase;

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

Rsm.Execute(Null);

//MDM repository updating

Rsm.Repository := RepositoryType.RDS;

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

Rsm.Execute(Null);

End Sub Main;

Update of the repository version and MDM repository version in accordance with the "current.rm4" and "current_rds.rm4" files takes place after executing this example.

See also:

IRepositoryScriptManager