IAdoMdConnection.Databases

Fore syntax

Databases: IStringList;

Fore.NET syntax

Databases(): System.Collections.Generic.IList<System.String>;

Description

The Databases method extracts a list of names of all available server databases, with which ADOMD directory is set up to work with.

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;
    DB: IStringList;
    s: String;
Begin
    MB := MetabaseClass.Active;
    Catalog := MB.ItemById("ADOMDTest").Open(NullAs IAdoMdCatalogInstance;
    Connection := Catalog.Connection;
    DB := Connection.Databases;
    For Each s In DB Do
        Debug.WriteLine(s);
    End For;
End Sub UserProc;

On executing the example the development environment console displays a list of databases created on the server, to which ADOMD directory is set up.

Fore.NET example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

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

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Catalog: IAdoMdCatalogInstance;
    Connection: IAdoMdConnection;
    DB: System.Collections.Generic.IList<System.String>;
    s: String;
Begin
    MB := Params.Metabase;
    Catalog := MB.ItemById["ADOMDTest"].Open(NullAs IAdoMdCatalogInstance;
    Connection := Catalog.Connection;
    DB := Connection.Databases();
    For Each s In DB Do
        System.Diagnostics.Debug.WriteLine(s);
    End For;
End Sub;

See also:

IAdoMdConnection