IRepositoryScriptManager.FetchVersion

Syntax

FetchVersion;

Description

The FetchVersion method receives the current repository version specified in the Repository property.

Comments

Use the VersionMajor, VersionMinor and VersionUnicode properties to view the information about the repository version.

Example

Executing the example requires the ORCL server named Test. The TestSchema schema is created on the server. A repository and MDM repository are created within this scheme.

Add links to the Dal, Fore 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;
    
//Get version for repository
    Rsm.Repository := RepositoryType.Metabase;
    Rsm.FetchVersion;
    Debug.WriteLine(
"Repository version");
    Debug.WriteLine(Rsm.VersionMajor.ToString);
    Debug.WriteLine(Rsm.VersionMinor.ToString);
    
//Get version for MDM repository
    Rsm.Repository := RepositoryType.RDS;
    Rsm.FetchVersion;
    Debug.WriteLine(
"MDM repository version");
    Debug.WriteLine(Rsm.VersionMajor.ToString);
    Debug.WriteLine(Rsm.VersionMinor.ToString);
    
If Rsm.VersionUnicode Then
        Debug.WriteLine(
"Unicode version of MDM repository");
    
Else
        Debug.WriteLine(
"Not unicode version of MDM repository");
    
End If;
End Sub UserProc;

After executing the example, the system will connect to the specified schema on the specified server. The versions that have repository or MDM repository created in this scheme are displayed in the development environment console.

See also:

IRepositoryScriptManager