Subject | Re: [firebird-support] Firebird roundind issues |
---|---|
Author | Fabiano Bonin |
Post date | 2009-07-02T13:58:03Z |
I know, and this is why i´m asking for an advice on how to store a
TBcd on the SQLDA structure. TBcd's store precise decimals in Delphi.
Regards,
Fabiano
TBcd on the SQLDA structure. TBcd's store precise decimals in Delphi.
Regards,
Fabiano
On Thu, Jul 2, 2009 at 4:01 AM, Mark Rotteveel<Avalanche1979@...> wrote:
>> Hi all,
>>
>> I don´t know if this is the right place to post this message, but anyway
>> there it goes...
>>
>> I´m having rounding issues with Delphi 2007/Zeos 6.6 and Firebird.
>>
>> When i try to save the extended value '3.26' it stores '3.2599999...'.
>
> This is perfectly normal when storing decimals as floating points. Don't store exact numbers as doubles if you want exact precision. Doubles are floating point numbers and are imprecise by definition.
> I don't know Delphi, but you need to use a precise decimal (eg BigDecimal in Java) in combination with a NUMBER or DECIMAL field on the database side.
>
> Mark
> --
> Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
> für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>