Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to see if file can be used exclusive w/o causing err
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00405024
Message ID:
00405285
Views:
17
>You can create your own error handle
>P.e
>
>On error myerror()
>USE mytable excl
>On error
>
>
>Function myerror
>*- Nothing
>Endfunc

Be careful of this. If you have the table open non-exclusively under a different alias, you can open it again with the exclusive keyword and it still not be exclusive:

USE table ALIAS test1
LOCAL lError
ON ERROR lError=.t.
USE table AGAIN IN 0 EXCLUSIVE

? lError && still shows as .F., no error, but you DID NOT open the table exclusively!


Note that if you do not use the AGAIN clause, it will error.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform