Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Used File
Message
 
To
19/07/1999 23:48:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00243420
Message ID:
00243630
Views:
34
You need to try to USE it exclusively, then test for an error condition.
Something like this. This code assumes that you don't have the file open
already on your workstation.

lcWasOnErr = ON("ERROR")
llOpenByAnother = .F.
ON ERROR llOpenByAnother = .T.
USE thefile.dbf EXCLUSIVE
IF llOpenByAnother = .T.
*--File was open by someone else.
ELSE
*--File is available for exclusive use.
ENDIF
USE IN thefile
ON ERROR &lcWasOnErr.

HTH
-Matt
Previous
Reply
Map
View

Click here to load this message in the networking platform