Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FLOCK() causes duplicate primary keys.
Message
De
26/08/2005 11:33:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows Server 2003
Database:
Visual FoxPro
Divers
Thread ID:
01043971
Message ID:
01044337
Vues:
12
>I take it that a DBC is not involved.
>So in that case I would use a semaphore when creating the primary key value. If the semaphore is not available, program would not create a primary key. It would either wait for the semaphore to be available or return to calling code telling user to try again.

I use free FoxPro 2 stucture tables only, no DBC.

Creating primary key requires reading last used key current value.
FLOCK() does this. It refreshed locked table with current values even from other users.

If you use semaphore (mutex?) then current values are not read to keys table.
So it is not possible to use some semaphore.
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform