Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Network sharing of VFP5.0
Message
 
 
À
23/12/1997 22:16:42
Alwin Wong
Chinatone Systems (China) Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00067781
Message ID:
00067811
Vues:
23
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform