Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable oExp.ErrorNo not found ?
Message
 
 
To
05/10/2012 12:19:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01554398
Message ID:
01554402
Views:
42
>>>Hey All
>>>
>>>In a Try/Catch block, in the Catch I've got the line
>>>
>>>If oExp.ErrorNo = 1466
>>>
>>>VFP is giving me the error of "Variable oExp.ErrorNo not found, yet there are plenty of examples where the ErrorNo is being referenced in the help files and when I look at the object in the debug window, I see a value for ErrorNo.
>>>
>>>I'm a wee bit confused here - what is VFP trying to tell me?
>>>
>>>Dorris
>>
>>How does your TRY CATCH look like?
>
>Much like any other, I suppose, and since the code is actually on a machine that's not attached to any other network, it's kind of a pain to port code back and forth.
>
>** SQL and Param stmts set up here
>Try
> ms1 = sqlexec(Thisform.r_conn, m.sqlcmd + m.params1)
>catch to oExp
> if oExp.ErrorNo = 1466
> ** appropriate message here
> endif
>endtry

I was just thinking may be you didn't have to oExp or have a typo there.

Ok, I guess you don't have a choice but to check vartype(oExp) ='O' and vartype(oExp.ErrorNo) = 'N' before the test. Not sure why it's behaving this way, but extra check should not hurt.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform