Subject Re: [firebird-support] Rounding on getting data
Author Alexandre Benson Smith
Luciano R. Machado wrote:

>Hi,
>
>The SimpleDataSet above receives an float value like 1,123456789
>
>SimpleDataSet.FieldByName('ValorCotacao').AsFloat := AdvEdit.AsFloat;
>
>By a break point at this line, I can see that the value of the AdvEdit
>is fine, but the number passed to the SimpleDataSet was rouded to
>1,123500000. The same situation under MS-SQL don´t get the value rouded.
>
>All TField´s objects are created at run-time, I don´t have any field
>on the Fields Editor.
>
>It happens with a set of ClientDataSet / DataSetProvider / SQLDataSet
>too.
>
>It also was tested with Interbase and UIB drivers.
>
>Best Regards.
>
>Luciano RM
>
>
>
What the type of this Field ?

TFloatField or TBCDField ?

if it's TBCD then it has only 4 decimals digits of precision.

Are you sure you are seeing the field value and not the display text ?

see you !

--

Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br