IDalCursorField.Name

Syntax

Name: String;

Description

The Name property returns the name of the cursor field.

Example

Sub Main;

Var

MB: IMetabase;

DB: IDatabaseInstance;

Com: IDalCommand;

Cur: IDalCursor;

CurField: IDalCursorField;

s: String;

Begin

MB := MetabaseClass.Active;

DB := MB.ItemById("BD").Open(Null) As IDatabaseInstance;

Com := DB.Connection.CreateCommand("Select * From Table_1");

Cur := Com.CreateCursor;

CurField := Cur.Fields.Item(Cur.Fields.Count - 1);

s := CurField.Name;

Cur.Close;

Com.Close;

End Sub Main;

After executing the example the connection to the BD database is established, after which the SQL query that selects all records from the Table_1 table is executed. The name of the last field of the received table is contained in the "s" variable.

See also:

IDalCursorField