Subject Re: Numeric Overflow
From Bruce Beacham <bbeacham@no_plm_lowman.co.uk>
Date Wed, 19 Apr 2017 21:44:13 +0100
Newsgroups dbase.getting-started

On 14/04/2017 04:28, Norman Snowden wrote:
> I have found the message “Numeric overflow (Data was lost)” occurs
> unexpectedly and fits no known pattern when the REPLACE Command is
> used to Replace a calculated field. Sometimes the program runs OK
> without the message, but always extremely slow

Do you replace a single field on a single row?    Or are you replacing
fields on many rows in one REPLACE operation?

What do you mean by a "calculated field"?    Do you mean a situation
where your table has (say) three fields:
Price
Quantity
TotalVal

and the calculated field is TotalVal?   And you are issuing
REPLACE ALL TOTALVAL WITH PRICE*QUANTITY      ?

> and in spite of the message the calculated field is actually Replaced.

I find that hard to believe.

> Recently I located an outdated web page that discusses the “Numeric
> overflow “ error message number 39 as it related to dBASE 4. Here, it
> is stated that dBASE 4 WILL NOT Replace a calculated field that
> contains more than 6 digits including the decimal. This page can be
> found by “ GOOGLING dBASE Numeric overflow error”.

But since you have converted to PLUS 32 bit that is not necessarily
relevant.

> It almost seems the program is operating as a hybrid type old 16 bit
> program since it runs so slow within my dBASE 10 environment
> computer. Something is wrong and I do not know what it is.

I suggest you have an inadvertent nested loop and you are making the
computer do far too much work.

> Is it possible the program is just too large and is maxed out?

No.

> I hate to have to start over and rewrite using object oriented only
> dBASE code.

Your problem is probably simpler than that.     I suspect you have some
dodgy data, for example data with NULL in one or more fields.


Bruce Beacham