Subject Re: [firebird-support] Paradox & Firebird
Author Don Gollahon
"sgharp" wrote:

>
>
> Hi All,
>
> I'm supporting 2 applications for a client. One uses Paradox as a
> database and the other Firebird 1.5. I have reports in both
> applications that calculate numbers that my client insists must match
> exactly. My problem is with differences in the way Paradox and
> Firebird stores numeric values, causing rounding errors that I can't
> seem to correct.
>
> My Paradox tables are all defined with Numeric fields (15 significant
> digits) and the Paradox application calculates all the numbers using
> the Double datatype in Delphi. In my Firebird application, I've had
> to define my Firebird database to use all Double precision (which I
> think is a close as I can come to the Paradox Numeric) and I'm
> calculating all the numbers in stored procedures using Double
> Precision datatypes.
>
> However, I'm unable to get stored procedures in Firebird to calculate
> numbers exactly the same as the numbers calculated in the Paradox
> application even though I've calculated the results in the same way as
> the Paradox application.
>
> Is it possible to get these numbers to match exactly? Is this a
> raasonable goal?
>
> Thanks for any guidance,
> Steve
>
>

I suggest you do the calculation in a shared unit between the 2 apps,
not in a stored procedure. Get the value to be accurate there first
and then save the result in the database. How many significant decimal
digits are you creating? If you are going to the full 15, then I would
cut it back a couple and round to 13 before storing and see if that
works. What development environment are you using? If you are using
ObjectPAL in Paradox then you could put the shared unit in a DLL so
both apps can use it.

Hope this helps.

--
_________________________________________
Don Gollahon
dlgllhn@...
ICQ#: 115831669
"What in Eternity does it matter?"
_________________________________________




[Non-text portions of this message have been removed]