Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verifying if a table is open exclusive
Message
From
22/09/1999 17:31:23
 
 
To
22/09/1999 16:50:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00267791
Message ID:
00267809
Views:
22
>Hi Martineau,
>
>>I have to open a table exclusive how can i verify if the table is not open by the other application.
>>Use Table In 0 Exlusive
>>a message box tel me that the table is use
>
>Do this:
>
>
lcError = on('error')
>on error *
>
>use .. excl
>
>on error &lcError
Now USED('table') will tell you if you were succesful or not. If this seems cumbersome, try to make it a reusable method.

Just to explain this idea a bit. The only way to make sure you get exclusive use of a table is to try to USE EXCLUSIVE and then have the error handler fire if you can't get it or do as Mike suggested.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform