IDalConnection2.Discover

Syntax

Discover(SystemDictionary: DalSystemDictionary; Filter: String): IDalCursor;

Parameters

SystemDictionary. Type of cursor received after executing the SQL query to the database.

Filter. Filter that is applied to the cursors received after executing the SQL query to the database.

Description

The Discover method returns the appropriate cursor depending on the SystemDictionary parameter.

Comments

If the driver does not support the appropriate SystemDictionary, Null is returned.

Example

To execute the example, connect the Metabase and Dal system assemblies to the module.

Sub Macro;
Var
    MB: IMetabase;
    DB: IDatabaseInstance;
    Cur: IDalCursor;
    Field: IDalCursorField;
Begin
    MB := MetabaseClass.Active;
    DB := MB.ItemById("BD").Open(NullAs IDatabaseInstance;
    Cur := DB.Connection.Discover(DalSystemDictionary.Tables, "");
    While Not Cur.Eof Do
        For Each Field In Cur.Fields Do
            Debug.WriteLine(Field.Name + " " + Field.Value);
        End For;
        Debug.WriteLine("");
        Cur.Next;
    End While;
    Cur.Close;
End Sub Macro;

After executing the example the system information about the tables stored in the specified database is displayed in the console window.

See also:

IDalConnection2