Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More on 'code' tables...
Message
De
07/07/1997 14:57:17
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00038443
Message ID:
00038826
Vues:
35
Barbara and John

Thanks much for the advice. I'd much rather learn from other's experience than my own mistakes ;^)!

Mandy

>>I was planning on then calling up all codes and display values starting with "P" for my Printer lookup table, all "S" codes for Storage Device Lookup tables etc. Now that I'm putting all my codes into one master code table and have converted them all into numeric strings (still in character fields), I'm just curious if I'm creating a more complex system than needed for adding new codes to my peripheral list. I was thinking I could break up the string during the "Add a record" phase to keep the first character my alpha subcodetype, and just increment the last 4 numeric characters.
>>
>>I also thought I could just create new codetypes and codes for each subclass (printers, storage devices, etc.) rather than trying to do this with the alpha first character. Help! Your words of wisdom are very much needed ;^)!
>>
>>MTIA,
>>Mandy
>
>Mandy, you shouldn't use your CODE field for anything except unique ID (as John also says). I'm assuming you're using the CodeType field to sub-divide your table into the various lookup categories. If this is so, then use this to divide your color printers from your tape drives, etc. If you have an existing table which uses the P0001, S0001 codes, then you may have to add this field temporarily to your lookup table and do a mass replace in your other tables - replacing the existing alphanumeric codes with the unique IDs.
>
>I don't like adding a child table to a lookup for two reasons. First, it partially defeats the reason for the single lookup table. Second, it adds complexity when you are trying to get the Display Value field to show on a grid, combobox, SQL for a report, etc. There are times when the practical solution is not necessarily the totally OOP or completely normalized solution.
>
>HTH
>Barbara
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform