Subject | RE: [IBO] Fields[xx].value - unidentifyed type: 14 |
---|---|
Author | Claudio Valderrama C. |
Post date | 2001-01-03T07:15:03Z |
> -----Original Message-----Yes, but one can try in the form's private section the declaration:
> From: Jason Wharton [mailto:jwharton@...]
> Sent: MiƩrcoles 3 de Enero de 2001 1:44
>
> > At least in TIB_xyz components, Value at the generic level is
> Variant, but
> > if you treat the field as its effective type (integer field,
> for example),
> > the Value property should give a result of the appropriate type (in the
> > example, Value is integer) and not a variant.
>
> Value in TIB_Column is a variant. This is unlike what people do with the
> VCL's TxyzField types that override the property with the properly typed
> one.
>
> In IBO you are typically dealing with just the TIB_Column and never the
> TIB_Columnxyz since I don't use persistent fields.
f: TIB_ColumnInteger;
In the AfterPrepare event:
begin
f := Sender.FieldByName('name') as TIB_ColumnInteger;
And later, after the dataset is open,
f.Value will give you an integer, not a variant.
The same trick applies to access the events of TIB_Column, since there're
not persistent fields.
C.