Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Yet another Unique Key generator
Message
 
À
21/11/1999 11:17:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00293537
Message ID:
00293651
Vues:
18
Can either of you please support your claims? I am not locking, because I don't need to lock. Locking takes time, locks get left in place, locks cause things to wait, and locks are not as portable to an SQL server. (I don't necessarily want to use an identity field.) Also, algorithms that use locks need to flip the alias around, and you then run the risk of it not getting flipped back to the right one.

So, do you guys still think it can fail? If so, please show steps.


>This is for SINGLE USER only. In multiuser environment you would have to lock the highest key until after you inserted and updated the new record.
>Why don't you just have a primary key table with tablename C and nextid I fields, look up the tablename you want to append to, lock it, add one to nextid and unlock it and then use this as the primary key for your data table.
>Peter
>
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform