IDalCursorField.GetDbDataType

Syntax

GetDbDataType: DbDataType;

Description

The GetDbDataType property returns the type of the cursor field.

Example

Sub Main;

Var

MB: IMetabase;

DB: IDatabaseInstance;

Com: IDalCommand;

Cur: IDalCursor;

CurField: IDalCursorField;

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;

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

i := CurField.GetDbDataType;

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 data type of the last field of the received table is contained in the "i" variable.

See also:

IDalCursorField