IStandardCube.Datasets

Syntax

Datasets: IStandardCubeDatasets;

Description

The Datasets property returns the collection of data sources for a cube. Tables, external tables, views, requirements, ODBC data sources can be used as a data source.

Example

Executing the example requires that the repository contains a standard cube with the Stan_Cube identifier.

Sub Main;

Var

MB: IMetabase;

StandCub: IStandardCube;

Dataset: IStandardCubeDataset;

i: Integer;

Begin

MB := MetabaseClass.Active;

StandCub := MB.ItemById("Stan_Cube").Bind As IStandardCube;

For i := 0 To StandCub.Datasets.Count - 1 Do

Dataset := StandCub.Datasets.Item(i);

Debug.Write((Dataset.Dataset As IMetabaseObject).CommonClassName + " ");

Debug.WriteLine((Dataset.Dataset As IMetabaseObject).Id);

End For;

End Sub Main;

After executing the example the console window displays names of object classes and identifiers of all the data sources used by this cube.

See also:

IStandardCube