Accessing Numeric as Int64
Accessing Numeric as Int64
IB stores large NUMERIC values as int64. How to access these fields with TUniQuery ? There is no .AsInt64 method for FieldByName and casting it as TLargeIntField(Fieldbyname).AsLargeint just returns a zero value. Trunc(Fieldbyname.AsFloat) works but that doesn't seem like the proper way to do it.
-
AndreyZ
Re: Accessing Numeric as Int64
InterBase stores NUMERIC fields as Int64 for performance reasons, actual values are Double. UniDAC maps NUMERIC fields as TFloatField, so to work with these fields, you should use the AsFloat property. If you want to obtain the Int64 representation of Double values, you should perform the conversion yourself.