Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique ID
Message
De
30/08/2004 11:07:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
30/08/2004 09:39:50
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00937563
Message ID:
00937624
Vues:
8
>What is the best method for creating a unique id for a record when multiole users are creating records at the same time?

You can have a table, SerialNumber, which stors the next number to be used for each PK or other sequence number.

A UDF, also called SerialNumber, will locate the corresponding record, lock the record briefly, increment it, and return either the old or the new value.

If a table's PK is not visible to the user, just assign your UDF as the default value for the PK field.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform