IAdoMdConnection.Cubes

Fore Syntax

Cubes(Cube: String): IDalCursor;

Fore.NET Syntax

Cubes(Cube: String): Prognoz.Platform.Interop.Dal.IDalCursor;

Parameters

Cube. Physical name of the cube.

Description

The Cubes method returns the cursor, that contains system information about the cube with specified name.

Comments

The obtained cursor contains the information about all the cubes contained in the ADOMD catalog if the Cube parameter is not specified. A specific record is added to the cursor to divide information by cubes. First field in this record has no name and the cube number is used as the field value.

Fore Example

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

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

The cursor, containing the information about all the cubes, contained in the ADOMD catalog, is obtained when executing an example. 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. 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;
    Cubes: IDalCursor;
    CFields: IDalCursorFields;
    CField: IDalCursorField;
    i: Integer;
Begin
    MB := Params.Metabase;
    Catalog := MB.ItemById["ADOMDTest"].Open(NullAs IAdoMdCatalogInstance;
    Connection := Catalog.Connection;
    Cubes := Connection.Cubes("");
    CFields := Cubes.Fields;
    While Not Cubes.Eof() Do
        For i := 0 To CFields.Count - 1 Do
            CField := CFields.Item[i];
            System.Diagnostics.Debug.WriteLine(CField.Name + " | " + CField.Value);
        End For;
        Cubes.Next();
    End While;
End Sub;

The cursor, containing the information about all the cubes, contained in the ADOMD catalog, is obtained when executing an example. This information is displayed in the development environment console.

See also:

IAdoMdConnection