Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Network sharing of VFP5.0
Message
 
 
To
23/12/1997 22:16:42
Alwin Wong
Chinatone Systems (China) Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00067781
Message ID:
00067811
Views:
27
>Here is the case:
>
>A FORM is created with serveral TABLEs which were put into the FORM's data environment. When one of table is used exclusively by one of network user, an error message "cannot access file(s)" showed if another user trys to open the same table. This is straight and no surprise. But the problem is VFP trys to open the subsequent (related) tables. Thus the error message shows ten time if there are ten tables.
>
>How to stop VFP to open other tables if VFP found one of a table in the data environment cannot be open (has been used exclusively)
>
>Thank you.

You need to handle this by trapping the error. I think this is error 1152 (see VFP Help on error messages). In the form ERROR method, you could try:
LPARAMETERS nError, cMethod, nLine
If nError() = 1152
   ThisForm.Release()
Endif
Of course you could develop something more sophisticated to handle various errors. But this should give you a good start.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform