Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique ID increment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00128168
Message ID:
00128199
Vues:
20
>Thom,
>
>You have to do it yourself. I create a table with one record per ID I need to generate. Each record has the name of the ID and the last number used. I have a function that accepts the name of the ID as a parameter. The function finds the appropriate record in the table of IDs, locks it, then increments it and returns the new value. The record locking ensures that two users are never assigned the same ID. You can then put a call to the function in the default for the field or call it in your code whenever you need to add a record.
>

Thom, there is an example of this technique in the TasTrade sample app that ships with VFP.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform