IAdoMdConnection.DimensionHierarchies

Syntax

DimensionHierarchies(Cube: String; Dimension: String; Hierarchy: String): IDalCursor;

Parameters

Cube. Physical name of the cube.

Dimension. Dictionary physical name.

Hierarchy. Dictionary hierarchy name.

Description

The DimensionHierarchies method returns the cursor, containing the system information about specified level hierarchy.

Comments

The obtained cursor contains information about all the dictionaries' hierarchies contained in the ADOMD catalog if the Cube, Dimension and Hierarchy parameters are not specified. The cursor with information about one or several hierarchies depending on what parameters are specified.

A specific record is added to the cursor to divide information by hierarchies. First field in the record has no name and the hierarchy number is used as the field value.

Example

Executing the example requires that the repository contains an ADOMD catalog with the ADOMDTest identifier. A cube with the Test physical name is contained in this catalog and a dictionary with the Dim_1 name is the part of this cube structure.

Sub UserProc;
Var
    MB: IMetabase;
    Catalog: IAdoMdCatalogInstance;
    Connection: IAdoMdConnection;
    DimHie: IDalCursor;
    CFields: IDalCursorFields;
    CField: IDalCursorField;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Catalog := MB.ItemById("ADOMDTest").Open(NullAs IAdoMdCatalogInstance;
    Connection := Catalog.Connection;
    DimHie := Connection.DimensionHierarchies("Test""Dim_1""");
    CFields := DimHie.Fields;
    While Not DimHie.Eof Do
        For i := 0 To CFields.Count - 1 Do
            CField := CFields.Item(i);
            Debug.WriteLine(CField.Name + " | " + CField.Value);
        End For;
        DimHie.Next;
    End While;
End Sub UserProc;

The cursor containing the information about hierarchies of the specified ADOMD dictionary is obtained on executing the example. The information is displayed in the development environment console.

See also:

IAdoMdConnection