Am 31.01.24 um 17:17 schrieb Santi via lazarus:
El 31/01/2024 a las 14:32, n Landmesser via lazarus escribió:
An SQL satatement on a float field is displayed as an integer field
in a DBGrid. The fields are created "on the fly" they are not static!
SQL statement is:
"SELECT AVG( km_gelaufen ) FROM laufdaten"
SQL returns the correct value "2,00739263803681" if i copy the value
in DBGrid, but DBGrid itself shows only integer value.
Look the format of the field component.
Is it a TIntegerField? Maybe you selected the wrong field type, it
should be a TFloatField
If it is a TFloatField, look at display format. Maybe you haven't
selected the number of decimal properly.
There is just the Database and a TQuery and the DBGrid , i execute the
SQL code and lazarus DBGrid shows the result as described above.
No static fielddefs with format options. The result field creates
lazarus "on the fly"
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus