Subject RE: [IBO] Fields[xx].value - unidentifyed type: 14
Author Claudio Valderrama C.
> -----Original Message-----
> From: Mauricio Longo [mailto:mlongo@...]
> Sent: Martes 2 de Enero de 2001 7:36
>
> TargetDataset.FielbyName('xxx').Value :=
> SourceDataset.FielbyName('xxx').Value;

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.


> assignment. I Don't remember right now if uses FieldByName or FieldValues
> or some other method but I don't think it would make a difference in this.

FieldValues always uses variant, as I understand. From IBA_Row.INT:

{: This property gives a variant result of the given column passed in.}
property Values[const ColumnName: string]: variant
read GetColumnValue
write SetColumnValue;


> The *main* problem I see is that I've already switched my field to Integer
> in Interbase but I still get the same problem. I'll try starting
> over this
> from scratch and let you know how it turns out.

Does the memory table keep settings in some initialization file? Are you
using TIB_Connection.SchemaCacheDir set to any directory? Or if you are
using TIBO components, then make sure you don't have a persistent field. In
this case, the only safe way I know is to delete the persistent field, shut
down Delphi if the db change was in the current session and you already were
connected to the db and finally, create again the persistent field.

Generators v/s integer values are tricky. In dialect 1 or IB5, generators
are 32 bit values. In dialect 3, generators are 64-bit values. However, you
can assign a generator to a 32-bit plain integer and you only will get an
error if your generator goes above 2^31-1, causing a numeric overflow.

C.