IDalCursorField.Size

Syntax

Size: Integer;

Description

The Size property returns the size of the cursor field.

Comments

The property returns the following values:

Example

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(Null) As 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 table fields.

See also:

IDalCursorField