IAdoMdConnection.CubeDimensions

Fore Syntax

CubeDimensions(Cube: String; Dimension: String): IDalCursor;

Fore.NET Syntax

CubeDimensions(Cube: string; Dimension: string): Prognoz.Platform.Interop.Dal.IDalCursor;

Parameters

Cube. Physical name of the cube.

Dimension. Physical name of the cube dimension.

Description

The CubeDimensions method returns the cursor, containing system information about specified dimension of the selected cube.

Comments

The obtained cursor contains information about all the dimensions, contained in the ADOMD catalog, if the Cube and Dimension parameters are not specified. The cursor contains information about all the dimensions with specified name, contained in any cubes of the ADOMD catalog, if the Cube parameter is not specified.

A specific record is added to the cursor to split the information by dimensions. First field in this record has no name and the dimension number is used as the field value.

Fore Example

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

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

After executing the example the user gets a cursor that contains information on the specified dimension of ADOMD cube. This information is displayed in the development environment console.

Fore.NET Example

Executing the example requires that the repository contains an ADOMD catalog with the ADOMDTest identifier. The cube with the Test physical name is contained in the catalog and the dimension with the Dim_1 name is the part of this cube structure. This example is an entry point of the .NET assembly.

Imports Prognoz.Platform.Interop.AdoMd;
Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Catalog: IAdoMdCatalogInstance;
    Connection: IAdoMdConnection;
    Dim: IDalCursor;
    CFields: IDalCursorFields;
    CField: IDalCursorField;
    i: Integer;
Begin
    MB := Params.Metabase;
    Catalog := MB.ItemById["ADOMDTest"].Open(NullAs IAdoMdCatalogInstance;
    Connection := Catalog.Connection;
    Dim := Connection.CubeDimensions("Test""TestDim");
    CFields := Dim.Fields;
    While Not Dim.Eof() Do
        For i := 0 To CFields.Count - 1 Do
            CField := CFields.Item[i];
            System.Diagnostics.Debug.WriteLine(CField.Name + " | " + CField.Value);
        End For;
        Dim.Next();
    End While;
End Sub;

After executing this example, the user gets a cursor that contains information on the specified dimension of ADOMD cube. This information is displayed in the development environment console.

See also:

IAdoMdConnection