Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generating id....
Message
 
À
18/02/2000 13:58:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00334247
Message ID:
00334258
Vues:
21
>How can I generate a id automatically for each record.

Concept is to have a table (I have named it "tables") that stores each of your table name and also the next available unique id for the table. When you need an id, find the record in "tables", lock the record, get the id, increment it, then unlock the table.

An example can be found in the Tastrade example that ships with VFP. In particular the function is newid().
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform