IDalCursorField.Precision

Syntax

Precision: Integer;

Description

The Precision property returns precision of the cursor field.

Comments

The property returns the following values:

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;
    sql : string;
    Com: IDalCommand;
    Cur: IDalCursor;
    Field: IDalCursorField;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    DB := MB.ItemById("BD").Open(NullAs IDatabaseInstance;
    sql := "Select * From Table_1";
    Com := DB.Connection.CreateCommand(sql);
    Cur := Com.DescribeCursor;
    For i:=0 To Cur.Fields.Count-1 Do
        Field := Cur.Fields.Item(i);
        Debug.WriteLine("--------------------------------------------");
        Debug.WriteLine("Field : "+ Field.Name);
        Debug.WriteLine("Size : "+ Field.Size.ToString);
        Debug.WriteLine("Precision : "+ Field.Precision.ToString);
        Debug.WriteLine("--------------------------------------------");
    End For;
    Cur.Close;
    Com.Close;
End Sub UserProc;

After executing the example the console window displays information about precision and size of the table fields.

See also:

IDalCursorField