IAdoMdCatalogInstance.Refresh

Syntax

Refresh;

Description

The Refresh method refreshes contents of the ADOMD catalog.

Comments

Structure of all the cubes and dictionaries, which created in the ADOMD catalog, is refreshed on executing the method. If server contains any new objects, the appropriate objects are created in the repository. If any objects were removed from the server, the corresponding objects in repository are removed.

Example

Executing the example requires that the repository contains an ADOMD catalog with the ADOMDTest identifier.

Sub UserProc;
Var
    MB: IMetabase;
    Catalog: IAdoMdCatalog;
    CatalogInst: IAdoMdCatalogInstance;
    Fail: IStringList;
    s: String;
Begin
    MB := MetabaseClass.Active;
    Catalog := MB.ItemById("ADOMDTest").Bind As IAdoMdCatalog;
    CatalogInst := Catalog.Open;
    CatalogInst.Refresh;
    Fail := CatalogInst.CubesFail;
    Debug.WriteLine("Cubes which were not updated: " + Fail.Count.ToString);
    If Fail.Count > 0 Then
        For Each s In Fail Do
            Debug.WriteLine(s);
        End For;
    End If;
    Fail := CatalogInst.CubesFailExceptions;
    Debug.WriteLine("Update errors: " + Fail.Count.ToString);
    If Fail.Count > 0 Then
        For Each s In Fail Do
            Debug.WriteLine(s);
        End For;
    End If;
End Sub UserProc;

The content of the ADOMD catalog is refreshed after executing this example. If on updating any errors appeared and some catalog cubes were not updated, the list of cubes and error text will be displayed to the console of development environment.

See also:

IAdoMdCatalogInstance