FetchVersion;
The FetchVersion method receives the current repository version specified in the Repository property.
Use the VersionMajor, VersionMinor and VersionUnicode properties to view the information about the repository version.
Executing the example requires the ORCL server named Test. The TestSchema scheme is created on the server. A repository and MDM repository are created within this scheme.
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;
//Receiving version for the repository
Rsm.Repository := RepositoryType.Metabase;
Rsm.FetchVersion;
Debug.WriteLine("Repository version");
Debug.WriteLine(Rsm.VersionMajor.ToString);
Debug.WriteLine(Rsm.VersionMinor.ToString);
//Receiving 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("MDM repository unicode version");
Else
Debug.WriteLine("Not MDM repository unicode version");
End If;
End Sub Main;
The connection to the TestSchema scheme placed on the Test server is set when executing this example. The versions that have repository or MDM repository created in this scheme are displayed in the development environment console.
See also: