Page 1 of 1

Accessing Numeric as Int64

Posted: Mon 28 Jan 2013 16:28
by Tsagoth
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.

Re: Accessing Numeric as Int64

Posted: Tue 29 Jan 2013 11:13
by AndreyZ
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.