FPC 3.2.2, Lazarus 3.4 x86_64 win and linux, Zeos 8.0.0
After update to 8.0.0, mariadb and postgres incorrect read double AsFloat from database mariadb and postges ONLY on linux. If get AsCurrency - is OK! This error only on linux, on windows is OK!
Example on linux maria and postrges:
Field VALUE_FLOAT = 172471.3
ZReadOnlyQuery1.Fields.FieldByName('VALUE_FLOAT').AsFloat = 3.69576882163363E-10
ZReadOnlyQuery1.Fields.FieldByName('VALUE_FLOAT').AsCurrency = 172471.3
ZReadOnlyQuery1.Fields.FieldByName('VALUE_FLOAT').AsString = 172471.3
ZReadOnlyQuery1.Fields.FieldByName('VALUE_FLOAT').AsInteger = 172471
if use AsBCD and BcdToDouble (unit FMTBcd) - is OK!
FloatToStr(BcdToDouble(ZReadOnlyQuery1.Fields.FieldByName('VALUE_FLOAT').AsBCD) = 172471.3
or if you use AsBCD instead of AsFloat
Last edit: Jony Rh 2024-09-06
Hello,
what is the field type in the database? Numeric(x,y)? float?
Best regards,
Jan
Hi, in mariadb DECIMAL(15,3), postgres NUMERIC(15,3)
Last edit: Jony Rh 2024-09-06
@marsupilami79, this is a bug or not?!
Last edit: Jony Rh 2024-09-09
project for testing and screens with results on linux ubuntu
Hello Jony,
I can not reproduce the issue. The output of your program for mariadb on my test computer is:
My system:
Zeos 8.0-patches from SVN
FPC 3.2.2 + Lazarus 3.4, compiles with fpcupdeluxe
Debian Linux 12.7 with MariaDB 10.11.6
So there are questions:
Which Ubuntu do you use?
How did you install FPC and Lazarus?
How did you install PostgreSQL and MariaDB?
Does it work for you if you install FPC and Lazarus using fpcupdeluxe?
Hello, marsupilami79
I'm using FPC 3.2.2 + Lazarus 3.4, . with fpcupdeluxe 2.4.0e on Windows and using cross-compile for linux64 and win64. Zeos8 from OPM. Error screens from Ubuntu 22.04 Desktop, installing mariadb and postgres from apt install. If using cross-compile with last version 7 - every is ok...
Last edit: Jony Rh 2024-09-13
:-(
I install new clear fpcupdeluxe 2.4.0e with last cross bins and libs (GitLab, stable), Zeos8 from OPM. But errors not missing. And adding to test project out AsBCD. Screens from Ubunbu 24.04.01, AltServer 10, Astra 1.7.5,9, RedOS 7.3.4
Last edit: Jony Rh 2024-09-16