Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use Tables Exclusive
Message
De
22/12/2003 18:39:36
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00861446
Message ID:
00861455
Vues:
24
>I need to open the tables exclusively in a form that contains alot of update operations on different tables, the problem is how to open all of my tables sucessifully if other users in the system, so I need to give the user a message and try to open the failed table again until I open all of my tables.

you could attempt the open the table exclusively and trap any errors that occur., e.g.
Local lnError, lnCounter
Store 0 To lnError, lnCounter
On Error lnError=Error()
Use mytable Exclusive
Do While lnError<>0 And lnCounter<1000 && only try 1000 times before giving a message to user
  lnError=0
  lnCounter=lnCounter+1
  Use mytable Exclusive
EndDo
If lnError<>0 Or lnCounter>=1000
  Messagebox("Could not open table.")
EndIf
On Error
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform