Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key Generation Advice
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00548941
Message ID:
00548961
Vues:
8
>I'm in the process of developing a multiuser application and am looking for some advice on primary key generation.. In single apps I used max + 1 for the primary key which works fine in a single user environment, but could cause problems in a multiuser environment.. I had the idea of a table which holds the next primary key for all of the tables.. When you want a new key you exclusivly lock the table, get the key, update the table and the release the key table. Any advice on how other people generate unique primary keys would be appriciated...
>
> Thanks
Hi Aaron,

That's the right idea, see for example
http://www.craigberntson.com/Articles/kb006.htm
for more info.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform