Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement