Somehow strange behaviour of ZQuery:
A SQL-Query like SUM(FieldName) on non persistant fields leads to strange Display like 9,9E2. But if you copy this 9,9E2 by Ctrl+c from DBGrid you have the correct value in clipboard!
The following example app uses ZeosLib and Lazarus SQLConnection and there you can see its only ZeosLib having this sissue.
See example application here:
https://drive.google.com/file/d/1-0-3WkanJI4nXDzvy7dYimCI8JaelOTW/view?usp=sharing
again this URL:
https://drive.google.com/file/d/1-0-3WkanJI4nXDzvy7dYimCI8JaelOTW/view?usp=sharing
I am using Manjaro Linux , trunk version of ZeosLib and "Lazarus 3.99 (rev main_3_99-2278-ge572621c4b) FPC 3.2.2 x86_64-linux-gtk2"
Hope thats all the needed information?!
Thanks for ZeosLib !!!
John Landmesser
Sorry, i did forget to mention: it is a sqlite3 Database !
What i recognized: this issue only appears on values with fractional part as 10,5 !
Hello John,
we are a bit perplexed because we can see the problem but don't know why the numbers get formatted in a different way with Zeos.
As a workaround I can only suggest to use the DisplayFormat property of the field for now:
Best regards,
Jan
Thanks Jan !
Thanks to google i use allready this workaround :-)
But why this issue only appears if there are fractional parts in the result and why SQLConnection and SQlite console apps don't have this issue ?
Dezimalseparator "." as in sqlite is transfered in DBGrid to comma, perhaps here arises the issue?
I have no experience in debugging components and i can live with that restriction of ZeosLib.
Keep this issue in mind, sometimes the solution comes "suddenly"
SQL-Query does NOT change decimalseparator from dot to comma:
From the example app: 990.32899999999995