Discover(SystemDictionary: DalSystemDictionary; Filter: String): IDalCursor;
Discover(SystemDictionary: ; Filter: String): ;
SystemDictionary. Cursor type to be obtained.
Filter. Filter applied to the cursor.
The Discover method returns the selected cursor type containing information about repository DBMS objects.
If the driver doesn't support the corresponding SystemDictionary, Null is returned.
To execute the example, add the Metabase and the Dal system assemblies to the module.
Sub Main;
Var
Mb: IMetabase;
Connect: ISecurityConnection;
Cursor: IDalCursor;
CFields: IDalCursorFields;
CField: IDalCursorField;
i: Integer;
Begin
Mb := MetabaseClass.Active;
Connect := Mb.LogonSession.PrimaryConnection;
Cursor := Connect.Discover(DalSystemDictionary.Tables, "");
CFields := Cursor.Fields;
While Not Cursor.Eof Do
For i := 0 To CFields.Count - 1 Do
CField := CFields.Item(i);
Debug.WriteLine(CField.Name + " | " + CField.Value);
End For;
Cursor.Next;
End While;
End Sub Main;
Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
Connect: ISecurityConnection;
Cursor: IDalCursor;
CFields: IDalCursorFields;
CField: IDalCursorField;
i, c: Integer;
Begin
Mb := Params.Metabase;
Connect := Mb.LogonSession.PrimaryConnection;
Cursor := Connect.Discover(DalSystemDictionary.dsdTables, "");
CFields := Cursor.Fields;
c := CFields.Count;
While Not Cursor.Eof() Do
For i := 0 To c - 1 Do
CField := CFields.Item[i];
System.Diagnostics.Debug.WriteLine(CField.Name + " | " + CField.Value);
End For;
Cursor.Next();
End While;
End Sub;
After executing the example the console window displays system information about the tables stored in the current repository.
See also: