Firebird NUMERICs problem
Posted: 11.02.2009, 21:09
I'm just trying to port some postgres DB to firebird 1.5 and found out that numeric(x,x) fields dont "show" correct results inside ZEOS componets when Firebird DB is used, eg:
Result shown in dbGrid says: 3.29999995231628 instead 3.3
When underlying table is opened with IBX (or IBO), result is OK. Only with ZQuery/ZTable shows wrong values (but with postgres is fine).
This is huge error which makes ZEOSlib practically useless with Firebird, at least for applications that use decimal datatypes.
On the other hand I can't beleive that I'm only one who uses ZEOS/Firebird with tables with decimal fields.
Conclusion:I'm probably doing something wrong. Please help - enlighten me or confirm bug.
Code: Select all
CREATE TABLE NUMTEST (
NUMERIC6_3 NUMERIC(6, 3),
DECIMAL6_3 DECIMAL(6, 3));
INSERT INTO NUMTEST(3.3, 3.3);
When underlying table is opened with IBX (or IBO), result is OK. Only with ZQuery/ZTable shows wrong values (but with postgres is fine).
This is huge error which makes ZEOSlib practically useless with Firebird, at least for applications that use decimal datatypes.
On the other hand I can't beleive that I'm only one who uses ZEOS/Firebird with tables with decimal fields.
Conclusion:I'm probably doing something wrong. Please help - enlighten me or confirm bug.