Board index » delphi » Incorrect CALC SUM in Paradox8...

Incorrect CALC SUM in Paradox8...

Hi,

I am using Paradox 8 and receiving incorrect calculations when running a
query with a CALC SUM.  The answer comes back 9,501.00 when it should be
951.00.  If I cut and past the number from the answer table into QuattroPro
it shows up correctly as 951.00.

Also when I sort my answer table the value shows up our of order the sort
goes
949.00
950.00
9,501.00
952.00

It is like the number is stored correctly in the table, but the view is
showing the number incorrectly.  I tried a few different number formats and
it still views incorrectly.

If I use the Table Repair Utility and verify the table the number then shows
up as 951.00.

This seems to happen every few thousand records.

Any ideas and/or solutions.

 

Re:Incorrect CALC SUM in Paradox8...


Is the Paradox table on a local drive or a network drive? If it is on a
network drive make sure the BDE on all computers is configured as described
in http://community.borland.com/article/0,1410,15247,00.html .

--
Bill
(TeamB cannot answer questions received via email)

Re:Incorrect CALC SUM in Paradox8...


I had a similar problem and found out it is a Paradox 8 display problem. Here is
the information from Corel's New Groupl

HTH - Rick

Quote
-------- Original Message --------
Subject: Re: Query Answer Table has Strange Color Coding of Some Results
Date: Mon, 19 Nov 2001 12:43:52 -0700
From: Liz <l...@paradoxcommunity.com>

Organization: ParadoxCommunity.com
Newsgroups: corel.wpoffice.paradox-dev
References: <3BF95447.66A25E20@transcanada.com>
<3BF95630.96104...@paradoxcommunity.com> <3BF9604E.EA9DF...@transcanada.com>

Rick,

Ah, this is another display error (doesn't carry over to
printing) in P8.  It results in a number being displayed as
(n-1)1 (as in 483 goes to 4821; 589 goes to 5881).  Math is
done correctly and printing is correct, but the numbers look
wrong on screen.

A fix for this follows (as posted by Bertil):

> ---quotes----
> I've managed to come up with a possible workaround for the calculation error
> issue in Paradox.

> Running the code below in a script seems to fix the calc error, until you
> open a form, report, or script in design mode. At that point, the error
> reappears.

> THIS IS NOT GUARANTEED TO WORK, and has not been tested extensively. In my
> informal tests using Paradox 8.00.302 and BDE 4.51, this code seems resolve
> the problem, (as outlined above), but I have not been able to reproduce the
> problem with any other version, and therefore cannot be sure it will work.

> -----------
> method run(var eventInfo Event)

>   strTable = ""
>   errorTrapOnWarnings(ON)
>   try
>     unlock(strTable, "Exclusive")
>   onFail
>   endTry
> errorTraponWarnings(No)
> endMethod
> -----------
> ---End quote 1 ---

As I understand it, this bug was fixed in P9.

Regards,

Liz
---
http://www.thedbcommunity.com/
http://www.thedbday.com/
http://www.aros.net/~law/

Rick Rans wrote:

> If the data is "safe", then why does a query that adds 31 of these numbers
(15.5806451612903 and something back from Oracle that
> makes them blue) together return 4821 instead of 483?(Sorry for the typo "The
Monthly number is 438 and the daily number is
> 438/31=15.5806451612903" should have been "The Monthly number is 483 and the
daily number is 483/31=15.5806451612903", transposed
> the 8 and the 3)

> If I do a query of Oracle with 483/31 I get a blue number and if I do a
Paradox calc 483/31, I get the same number but not blue.

> It's the summing of 31 numbers that returns the bad number that I am worried
about, 4821 instead of 483.

> Thanks - Rick

Trevor stripling wrote:

> Hi,

> I am using Paradox 8 and receiving incorrect calculations when running a
> query with a CALC SUM.  The answer comes back 9,501.00 when it should be
> 951.00.  If I cut and past the number from the answer table into QuattroPro
> it shows up correctly as 951.00.

> Also when I sort my answer table the value shows up our of order the sort
> goes
> 949.00
> 950.00
> 9,501.00
> 952.00

> It is like the number is stored correctly in the table, but the view is
> showing the number incorrectly.  I tried a few different number formats and
> it still views incorrectly.

> If I use the Table Repair Utility and verify the table the number then shows
> up as 951.00.

> This seems to happen every few thousand records.

> Any ideas and/or solutions.

Other Threads