IDtObjectMetaData.Tables

Syntax

Tables: Array;

Description

The Tables method returns the string array that contains names of data provider or data consumer tables.

Example

Executing the example requires that the repository contains an ETL task with the ETL identifier. The first task object is any data provider that uses drivers OLE DB for connection. For example, import from Access.

Sub UserProc;
Var
    MB: IMetabase;
    Task: IEtlTask;
    Provider: IEtlPlainDataProvider;
    MetaData: IDtObjectMetaData;
    Arr, Arr1: Array Of String;
    s: String;
Begin
    MB := MetabaseClass.Active;
    Task := MB.ItemById("ETL").Bind As IEtlTask;
    Provider := Task.Item(0As IEtlPlainDataProvider;
    MetaData := Provider.Provider As IDtObjectMetaData;
    Arr := MetaData.Tables;
    Arr1 := MetaData.Views;
    Debug.WriteLine("Table");
    For Each s In Arr Do
        Debug.WriteLine(s);
    End For;
    Debug.WriteLine("View");
    For Each s In Arr1 Do
        Debug.WriteLine(s);
    End For;
End Sub UserProc;

After executing the example the development environment console displays a list of tables and views, kept in the object, to which data provider of the ETL task is set.

See also:

IDtObjectMetaData