Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Regenerating Same ID Numbers for Different Entities
Message
De
01/07/2009 15:53:10
 
 
À
01/07/2009 14:31:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxExpress
Divers
Thread ID:
01409629
Message ID:
01409651
Vues:
37
>I have an Agencies - Departments - Functions arrangement where each has an ID. I'd like to auto-generate ID numbers for each and be able to regenerate the same numbers for each new entity. For example: Agency ID 1, Agency ID 2, ...Agency ID n. Then for each agency's departments, Dept ID 1, Dept ID 2, ...Dept ID n. And similarly for Functions so that given different agencies I'd have:
>Agency ID 1 - Dept ID 1 - Function ID 1;
>Agency ID 1 - Dept ID 1 - Function ID 2;
>Agency ID 1 - Dept ID 2 - Function ID 1;
>Agency ID 2 - Dept ID 1 - Function ID 1, and so on.
>
>I'd appreciate some ideas on how to go about doing so. I'm currently using Visual FoxExpress. It provide a VFENewKey function that autogenerates values but does not regenerate them as above.

What the point of that? IDs are supposed to be meaningless. It is just a key to link relational tables. Also, departments belonging to different agencies are supposed to have different IDs. It seems that you want to have separate sequential fields like AgencyNo, DeptNo, FuncNo in addition to IDs.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform