Copying grand parent, parent, and child records 
Author Message
 Copying grand parent, parent, and child records

Quote:

> I want to copy a grandparent record from Database 1, related parent records
> from Database 2, and related child records from Database 3 into Database 4,5,6
> respectively while maintaining the links.  The AI IDs will change when going
> into 4,5,6.

> Anyone know an easy way to do this?

Use two different procedures

Procedure1 can use a view with filter (or whatever method you want) to
copy the children records.  For each child record copied, call
procedure2, which then copies each grandchild record for the child.

You can use the process templates to make the procedures, using range
limits.  In procedure1, the activity for each record would be something
like this:

   child2:record = child:record
   ! assign your new ID to the child 2 record here
   add(child2)
   procedure2  ! call procedure2 for the grandchildren transfer

I hope this is clear.

Dan



Tue, 23 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Copying autonumbered parent, child, grandchild records...

2. Copying Parent, Child, Grandchild Records...

3. Copying Parent, Child, Grandchild autonumbered records...

4. Copying Parent child grandchild records

5. Add Child Record Within New Parent Record form.

6. Adding child records for a newly inserted parent record (CW2003)

7. C4b - Copying Parent and Children

8. Copying Parent, Child, Grandchild....

9. SQL - adding child record from parent form

10. How To restrict child browse to selected parent browse record

11. Reports with One Parent and Two Child files(multiple records eacy)

12. Saving child rec before Parent record, How?

 

 
Powered by phpBB® Forum Software