>>>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