Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird problem with Numerical overflow!
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00630340
Message ID:
00630753
Views:
19
Ok, you see my frustration :)

Check Forum: Visual FoxPro Category: Coding, syntax & commands Title: Re: Understanding REPLACE command Thread #630443 Message #630751 for replicating of the problem.

You can proceed in this thread, if you have ideas, what's going on and why this program doesn't produce an error, as it should...

>I don't think you expected any replies to this post, did you? :)
>
>>Hi everybody,
>>
>>We ran transformation on the live server and got an error "Numerical overflow", because we had bad data. Ok, we repeat the same thing on Development server and didn't get an error. We explicitly put constant 1000 to replace N(2) field and we still didn't get an error. The application, which performs a transformation, generates a program like:
>>replace y.Field1 with ..,y.Field2 with .., etc. in a very long string. When we ran this program, it doesn't generate an error and * are inserted! However, when I removed part of the replace statement and left only few portions of it, it did generate an Error, as expected!
>>
>>Very strange. Do you see a reason, why long replace statement doesn't produce an error, while short does? I was stepping it through in debugger and didn't get an Error...
>>
>>BTW, I suggested my colleague to create this program in more readable manner (e.g. put each field replacement on the separate string), but I doubt, he would be allowed to change it without long debates, etc. I can do it myself, if I get my manager and my colleague's permission to change this particular piece of code...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform