Item(Index: Integer): IDalCursorField;
Index - field index.
The Item property returns cursor fields.
Sub Main;
Var
MB: IMetabase;
DB: IDatabaseInstance;
Com: IDalCommand;
Cur: IDalCursor;
CurFields: IDalCursorFields;
i: Integer;
Begin
MB := MetabaseClass.Active;
DB := MB.ItemById("BD").Open(Null) As IDatabaseInstance;
Com := DB.Connection.CreateCommand("Select * From Table_1");
Cur := Com.CreateCursor;
CurFields := Cur.Fields;
For i := 0 To CurFields.Count - 1 Do
Debug.WriteLine(CurFields.Item(i).Name);
End For;
Cur.Close;
Com.Close;
End Sub Main;
After executing the example the connection to the BD database is established, the SQL query which selects all records from the Table_1 table is executed. The development environment console displays names of all table fields.
See also: