IDWRepositoryDatabaseInstance.CurrentVersion

Fore Syntax

CurrentVersion: String;

Fore.NET Syntax

CurrentVersion: string;

Description

The CurrentVersion property returns the current version of extended data warehouse.

Comments

The IDWRepositoryDatabaseInstance interface is outdated.

The Extended Data Warehouse Repository object is used only to support earlier versions.

The property generates an exception if an error occurred during check of the repository current version.

Fore Example

Executing the example requires an extended data warehouse repository with the DW_REPO identifier.

Add links to the Db and Metabase system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    DwInst: IDWRepositoryDatabaseInstance;
    Repo, Db: IMetabaseObject;
    Res: String;
Begin
    Mb := MetabaseClass.Active;
    DwInst := mb.ItemById("DW_REPO").Open(NullAs IDWRepositoryDatabaseInstance;
    Repo := DwInst.Repository As IMetabaseObject;
    Debug.WriteLine("Name of extended data warehouse: " + Repo.Name);
    Db := DwInst.Database.Database As IMetabaseObject;
    Debug.WriteLine ("Identifier of used DB: " +  Db.Id);
    Try
        Res :=  "Current version of repository : " +  DwInst.CurrentVersion;
    Except On E: Exception Do
        Res :=  "Error: " +  E.Message;
    End Try;
    Debug.WriteLine(Res);
End Sub UserProc;

After executing the example the console window displays the current version and the name of extended data warehouse repository, its database identifier.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Db;

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    DwInst: IDWRepositoryDatabaseInstance;
    Repo, Db: IMetabaseObject;
    Res: String;
Begin
    Mb := Params.Metabase;
    DwInst := mb.ItemById["DW_REPO"].Open(NullAs IDWRepositoryDatabaseInstance;
    Repo := DwInst.Repository As IMetabaseObject;
    System.Diagnostics.Debug.WriteLine("Name of extended data warehouse repository: " + Repo.Name);
    Db := DwInst.Database.Database As IMetabaseObject;
    System.Diagnostics.Debug.WriteLine("Identifier of used DB: " +  Db.Id);
    Try
        Res :=  "Current version of repository : " +  DwInst.CurrentVersion;
    Except On E: Exception Do
        Res :=  "Error: " +  E.Message;
    End Try;
    System.Diagnostics.Debug.WriteLine(Res);
End Sub;

See also:

IDWRepositoryDatabaseInstance