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:
00128169
Vues:
23
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.

>Hello all,
>
>In MS Access there is a data type in a table called 'COUNTER'. This is a number that is increased with every new record, and is a unique number. I noticed that there isn't a data type in FoxPro like this. How are you handling unique incemental ID's in a FoxPro table?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform