IDalCursorField.Value

Syntax

Value: Variant;

Description

The Value property returns the value of the field of the current record in the cursor.

Comments

This property returns the value of the type that returns the GetDbDataType property. If a field has any custom data type, the field value can be accessed through a stream. To read more about working with custom type fields, use the knowledge base in the Working with Fields That Have Custom Data Type article.

Example

Sub Main;

Var

MB: IMetabase;

DB: IDatabaseInstance;

Com: IDalCommand;

Cur: IDalCursor;

CurField: IDalCursorField;

v: Variant;

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);

v := CurField.Value;

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 value of the last field of the first record of the received table is contained in the "v" variable.

See also:

IDalCursorField