IRepositoryScriptManager.Unicode

Syntax

Unicode: Boolean;

Description

The Unicode property determines whether the unicode repository version is created.

Comments

If the property is set to True, all string fields of the tables in the database are created with the NVARCHAR type while creating the repository.

Example

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 platform repository will be created at the Test server in the TestSchema scheme.

See also:

IRepositoryScriptManager