IDalCursorFields.Count

Syntax

Count: Integer;

Description

The Count property returns the number of cursor fields.

Example

Executing the example requires that the repository contains a database with the BD identifier.

Add links to the Dal, Db, and Metabase system assemblies.

Sub Main;
Var
    MB: IMetabase;
    DB: IDatabaseInstance;
    Com: IDalCommand;
    Cur: IDalCursor;
    CurFields: IDalCursorFields;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    DB := MB.ItemById("BD").Open(NullAs 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, and 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:

IDalCursorFields