Hi there,
I am having a weird problem that I could not isolate up to now.
it SEEMS to be like this http://zeoslib.sourceforge.net/viewtopi ... ency#p8901
However I am using 7.0.3-stable with Firbird 1.0 (yes the 1.0 that is right), Delphi XE2 update 4
Everything worked fine up to now, but I found recently one case that got attention, not sure it happened more times, but that one was a Value 4.20 that insist to be 4.19 when saved on the table.
There is no calculations, the value comes from a string. I am using a INSERT on a ZQuery, with many other fields that are doing correct, but this one:
paramByname('VALOR_ITENS').AsCurrency := strtocurr('4.2');
or even
paramByname('VALOR_ITENS').AsString := '4.2';
The field is saved as 4.19 always.
The field is declared as NUMERIC(12,2). Certanly there are other cases, but this is the only that I could see and reproduce easily. I have a lot of fields like that.
It seems some precision problem. How can I avoid that?
Thank you
EDIT: with AsFloat the problem did not happen. I was afraid of using float just because precision with money value. It fixes this particular problem, not sure if the problem happens diferently with other values !!!!
Currency problem with Firebird
Moderators: gto, cipto_kh, EgonHugeist
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Currency problem with Firebird
AFAIK is this issue resolved. Don't know the revision anymore.
So please update your Zeos.
So please update your Zeos.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/