Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Primary keys
Message
De
08/08/1996 13:04:21
 
 
À
08/08/1996 12:53:12
Paul Baker
Pacific Environmental Services, Inc.
Rtp, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00005298
Message ID:
00005299
Vues:
32
>Can someone give me advice on the best way to assign primary key field values to individual records in a table. I have tables where the only unique value field is a description field. I don't want to use a 50 character description field as the primary key. I have routines to generate a key based on a counter. Is this the best way to assign values?

IMHO yes
what i do is as follows :
i have a table which holds the keys, thier type and the current value
and i have a routine in the stored procedure that takes as a parameter
the name of the key - serached the table increase the value by one
and return the new value
i call this funtion from the key field "default value"

HTH

Arnon Gal-Oz
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform