Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoid repeated values with more than two users
Message
 
À
06/06/2008 15:30:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01322172
Message ID:
01322318
Vues:
10
About Borislav code below:

=======================================
USE NewKey IN 0
IF NOT FLOCK([NewKey])
MessageBox([Somebody tries to add records right now, please try after a few seconds])
RETURN
ENDIF
=====================================

As far as I understood, there is a small chance 2 users are
saving the record at the same time. And also this event
will last just for a little while (correct me if I am wrong)

So instead I messagebox, is there a way that in case FLOCK( ) fails,
the software would wait a second and try it one or more times until it is sucessfully ?

(because maybe in a second the user would be already saved his record)

Moises
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform