Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for Valid DBF Before USE?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01182006
Message ID:
01182050
Views:
16
>>
>>TRY
>>	USE MYTABLE
>>CATCH
>>	=MESSAGEBOX(MESSAGE())
>>ENDTRY
>>
>
>I'm using v7.0, and I believe the TRY/ENDTRY support is not in this version. At least, it's not being recognized, nor is it in my help file. Is there another approach?
>
>---Michael

LOCAL llError
lcOnError = ON('error')
ON ERROR llError = .T.
USE Mytable
IF llError
* Action
ENDIF
ON ERROR &lcOnError

By the way, TRY/CATCH is one of the coolest additions to VFP. It's second only to Intellisense.
Previous
Reply
Map
View

Click here to load this message in the networking platform