Numeric Overflow in 6.0 Table

Numeric Overflow in 6.0 Table

Post by ZorkBe » Wed, 22 Sep 1999 04:00:00

Dear Fellow Programmers,

  We are experiencing an annoying problem with VFP 6.0.  When we encounter a
'numeric overflow. data was lost' error in our code (for instance, performing
the dreaded divide by zero operation,and then using gather memvar to save the
resultant to a numeric field) we find VFP locks up and fails to respond.  I
know we should probably be coding to prevent these occurances, but the fact is,
unless you code from the beginning to locate such occurances, this would be
painfully difficult.  This is especially so in our applications which interface
with 3d Party Data that is often dirty.   I remember reading a while back a
workaround using MSVCRT20.DLL and using the _fpreset function, however that
doesnt seem to be working.  

  I guess what I am asking is this.. IS that the proper fix?  perhaps I am
executing the code wrong... is there a better way?  Our code is as follows:

    IF FILE('C:\WINDOWS\SYSTEM\msvcrt20.dll')
      DECLARE _fpreset IN msvcrt20.dll

Any help in this matter would be greatly appreciated.

Mike O.


1. Arithmetic overflow error converting numeric to data type numeric


Maybe stupid question.
When attempting to write a value of less than 4100000 (or near to) , to a
SQLserver databasefield of type integer,
works fine.
But when when trying to write a value of for ex. 4200000 fails :
Error message is [Microsoft][ODBC SQL Server Driver][SQL Server]Arithmetic
overflow error converting numeric to data type numeric.[Microsoft][ODBC SQL
Server Driver][SQL Server]The statement has been terminated.

We pass the value from a web based interface using a language called iHTML,
it is very ColdFusion alike.

What do we do wrong?

Any hints, tips? Thanx!



3. SqlCeDataReader and Numeric Datatype Causes Overflow Exception

4. Catenate Address Fields

5. Artimetic Overflow error converting int to Numeric

6. Moving SQL 7 databases

7. double precision to numeric overflow error

8. ???Datatype???

9. java.sql.SQLException: Numeric Overflow

10. Numeric Overflow

11. numeric field overflow when accessing cell in excel file