Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exclusive use of table
Message
De
10/07/2001 20:04:42
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
À
10/07/2001 19:45:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00508197
Message ID:
00528984
Vues:
22
Keith,

Either check in the usual error handler, or do something like:

ON ERROR lOpenedExclusively = .F. && if no go, set flag

Then after:
>* ----- Attempt exclusive open
>SELECT 0
>USE mytable EXCLUSIVE

check the flag and go from there...HTH, J

>Question on this code:
>
>LOCAL cErrorHandler
>
>* ----- Store the current error handler
>cErrorHandler = ON("error")
>
>* ----- Turn Error Handler off
>ON ERROR *
>
>* ----- Attempt exclusive open
>SELECT 0
>USE mytable EXCLUSIVE
>
>* ---- Reset error handler
>ON ERROR &cErrorHandler
>
>IF NOT USED("mytable")
> * ----- File wasn't opened
> * Add appropriate code here
>ELSE
> * ----- File opened exclusively
> * Add appropriate code here
>ENDIF
>
>I'm trying to use this code in a .exe file that is run unattended on a server. The problem is, once you turn the error handler off a message window is displayed which requires user intervention.
>
>How do you do you test for exclusive use and still send the results to an error routine.
>
>Keith Larsen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform