Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When to make codes for a lookup table
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00094708
Message ID:
00095689
Views:
26
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform