Subject 6 decimals
Author Tiberiu Horvath
Hi all,

Firebird 2.1, Delphi 2007 - using IBX components to access Firebird data.


I have a field in my database, that is

CURS_VALUTA DECIMAL (18, 6) - need this because of transactions to/from HUF
(hungarian forints - euro - RON Romanian lei). One HUF = 0.014687 RON ; One
HUF = 0.004023 euro

I want to show / print / save the value for this field in my application.

var
curs_valuta: Extended;


...

curs_valuta:=my_query.fieldbyname('curs_valuta').AsFloat;

here local variable curs_valuta receives 0.0015

I tried also with

my_query.fieldbyname('curs_valuta').AsString

but the value is also truncated ( '0.0015' )


also

BCDToCurr(my_query.fieldbyname('curs_valuta').AsBCD, curs_valuta );

is of no use.


How can I increment the number of decimals ? (Or decrement the truncation)

Asked about this in borland.public.delphi.ide - they said I should use
proper component set, not IBX, to access the data. Can you help me in
chosing one replacement for IBX ?




Tiberiu