Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary index
Message
From
08/11/2002 16:03:15
 
 
To
08/11/2002 13:34:36
Irv Adams
MSC Managed Care, Inc.
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00720081
Message ID:
00720506
Views:
9
That's easy ...

The PK has nothing to do with the parent record. The PK is totally unique to the child record.

>Just curious...how would you handle this if the PK was used in a Parent-child relationship with another table? You couldn't just regenerate the PKs without re-establishing the previous relationships, right?
>
>-Irv.
>
>
>>>Craig,
>>>
>>>>Change the PK field to a different value in the temp table before you append back in the records<
>>>
>>>You mean to a value that would make it unique before I append it back to the original table?
>>>
>>>Mel Cummings

>>
>>That's exactly what Craig means. PK's should be surrogate keys anyway. Therefore the keys used are meaningless. Their only requirement is uniqueness. Just replace the temp file keys with newly generated PKs using your normal PK scheme and you are done.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform