Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Increasing primary key integers in a table
Message
De
18/09/1998 10:17:38
 
 
À
18/09/1998 10:12:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00138182
Message ID:
00138187
Vues:
11
>Hello,
>
>We are using Visual FoxPro 5.0 and we are building a framework. For our tables we want to use a primary key on an 'integer'-field. Is it possible to increase the integer automaticly every time we add a new record so we will get a surrogate primary key?
>
>Greetings,
>
>Afier Appelman

It's standard way: you have separate table 'setup.dbf' to store tablename and next available keyvalue. When application requests new key, it goes to this table, locates appropriate table name, locks this record, picks up the leyvalue, increments it, unlocks the record and returns keyvalue.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform