Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combining two records into one
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01562824
Message ID:
01562895
Vues:
27
>>>>>Hi,
>>>>>
>>>>>I am considering a feature for my app that would allow user combining two records into one. For example, say in the parts table they have two pars "1234" and "1234A" and at some point (after years of use) they realize that this is one and the same part. They can't rename one into the other because another record of unique entry already exists. They can't delete one because it has child records (transactions, P.O.s etc.). So I am thinking of writing a routine that would do it in code. Does it make sense? What I mean is, do others (as other developers on this message board) have routines that allow combining two records with different values in unique field into one? TIA.
>>>>
>>>>I guess depending upon how your tables are designed I'd just change the key-value of one to the other so the foreign keys all match up - and then create some sort of log of these changes so you can see the history of the ones changed (should you ever be asked for it).
>>>
>>>Thank you. I will certainly keep some audit trail of the changes and who (as to the user ID) did it.
>>
>>I had to write something similar one time - and another gizmo that went out and deleted a bunch of orphan records (the parent was deleted, but not the child record). I made a screen and had a button on it I labeled "Orphan Killer". The little old ladies and my client's office didn't seem to have the same sense of humor I had...ooops.
>
>haha.. that is some guts to call anything "orphan killer" . These days that would have taken your hand gun away from you (following on the other thread you have :))

ahh but I'm the guy without the gun. No what would happen now is the little old lady would building security and 50 armed guards would come with guns ablazen.
ICQ 10556 (ya), 254117
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform