Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When to make codes for a lookup table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00094708
Message ID:
00095689
Vues:
27
>>Sorry. If you would have need to modify or add additional choices to a combobox, then put the choices in a lookup table instead of a hard-coded array or hand-entered choices. The original question was when should a lookup table be used versus hand-entered choices (hard-coded). I strongly believe lookup tables should have a primary key (integer) field and a description field with the pk being the stored value in the data tables NOT the description -- descriptions can change causing a big mess in your data tables.
>
>The original question was when should the lookup table have a separate key field, and you answered, in effect, "always". I guess that, even if the lookup table doesn't get modified often, you don't trust RI at all. But I suppose that there really is no reason not to use the key field, even if the descriptions are only three characters long.

Just re-read the original posting. Lesson learned (again) -- the hazards of snipping to shorten a reply.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform