Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric overflow issue
Message
From
03/12/2001 16:52:42
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00588052
Message ID:
00588952
Views:
35
Chris and Antonio,

Testing for myField = 1/0 returns true on a field with a numeric overflow condition. So this should be a good general solution, or you could SCAN/ENDSCAN and check the condition on each record if necessary:
REPLACE myField with 0 for myField = 1/0
>
>AFIELDS gives some info, and there are a few more that I cant think of off the top of my head.
>But by passing the Size and Dec you can use this for more then just a field of an opened database. Making it a general approach.
>If I was doing something with checking for overflows, I would no doubt do an AFIELDS()
>then Loop through that, take the size and precision, pass it into the above code, and then replace for myField > maxVal, though it isnt the best way to do the replacement either, replace for locks the entire table if im not mistaken.
>
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform