<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">El 31/01/2024 a las 14:32, n Landmesser
via lazarus escribió:<br>
</div>
<blockquote type="cite"
cite="mid:ace11a44-aa7c-4fc2-93e8-b14f24a17adb@gmx.de">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>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!</p>
<p><br>
</p>
<p><img src="cid:part1.8KHlLSQ3.fTi1ThUy@ciberpiula.net" alt=""
class=""></p>
<p><br>
</p>
<p>SQL statement is:</p>
<p>"SELECT AVG( km_gelaufen ) FROM laufdaten"</p>
<p>SQL returns the correct value "2,00739263803681" if i copy the
value in DBGrid, but DBGrid itself shows only integer value.</p>
</blockquote>
<br>
Look the format of the field component.<br>
Is it a TIntegerField? Maybe you selected the wrong field type, it
should be a TFloatField<br>
If it is a TFloatField, look at display format. Maybe you haven't
selected the number of decimal properly. <br>
<br>
<br>
<blockquote type="cite"
cite="mid:ace11a44-aa7c-4fc2-93e8-b14f24a17adb@gmx.de">
<p>Any idea how to correct that?<br>
<br>
It is a SQlite database.</p>
<p>Info:</p>
<p>Lazarus 3.99 (rev main_3_99-1333-g5c01e6a88e) FPC 3.2.2
x86_64-linux-gtk2</p>
<p>Tipps are welcome ..,</p>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Saludos
Santi</pre>
</body>
</html>