IDalCursorField.GetDbDataType

Syntax

GetDbDataType: DbDataType;

Description

The GetDbDataType property returns the type of the cursor field.

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 UserProc;
Var
    MB: IMetabase;
    DB: IDatabaseInstance;
    Com: IDalCommand;
    Cur: IDalCursor;
    CurField: IDalCursorField;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    DB := MB.ItemById("BD").Open(NullAs 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 UserProc;

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