Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
And another one...
Message
From
21/04/2000 05:40:29
 
 
To
21/04/2000 04:13:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00362153
Message ID:
00362160
Views:
14
Depending on the information that you require, you may need to use a third party product like GPLIB or equivalent. Alternatively, if you just wish to know if somebody is using a file, database, table etc., etc., you can use error trapping. For example:

llTableUsed = .F.
on error llTableUsed = .T. && Use error trapping
use C:\MyTable exclu && Attempt to open table exclusively
if llTableUsed && Therefore error created, table is in use
endif

All you're trying to do is open the table exclusively. If an error occurs then someone else must have the table open, if not then nobody is using it. This is rather crude, but it does work. Don't forget to close MyTable, or at least open it as shared........

Derek
Previous
Reply
Map
View

Click here to load this message in the networking platform