Copying autonumbered parent, child, grandchild records... 
Author Message
 Copying autonumbered parent, child, grandchild records...

Need an easy way to duplicate autonumbered Parent, Child, Grandchild, Great
Grandchild, etc. records into the same file they're now in.  Using CW2.003,
TPS file system.  Looks like this:

Location (autonumbered LocationID)
    System Family (LocationID, autonumbered FamilyID)
        System (FamilyID, autonumbered SystemID)
            Component (SystemID, autonumbered ComponentID)

Thanks - Ty



Sat, 16 Jun 2001 03:00:00 GMT  
 Copying autonumbered parent, child, grandchild records...
Quote:

> Need an easy way to duplicate autonumbered Parent, Child, Grandchild, Great
> Grandchild, etc. records into the same file they're now in.  Using CW2.003,
> TPS file system.  Looks like this:

This is easier in ABC but in 2.003 I'd probably declare a buffer:
Loc:buffer like(loc:Record) !for location
Syf:Buffer loke(Syf:Record) !for system family

then copy the record:
loc:buffer = loc:Record
Clear(loc:record)
do primeRecord !or what ever the 2.003 name is
!save the autonumbered field
sav:AutonumberedField = loc:sysid
loc:Record = loc:buffer !restore old data
loc:AutonumberedField = Sav:Autonumberedfield !resote new autonumber
Put(location) !save the additional fields

Same basic process for all the related files.
---
Jim Kane  - TeamTopSpeed
Productive Software Solutions
Can't Find that Message?
Get Organized, Get ForKeeps!
www.fkeeps.com



Sat, 16 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

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

3. Copying Parent child grandchild records

4. Copying Parent, Child, Grandchild....

5. Copying grand parent, parent, and child records

6. Duplicating a parent-child-grandchild

7. Add Child Record Within New Parent Record form.

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

9. C4b - Copying Parent and Children

10. SQL - adding child record from parent form

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

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

 

 
Powered by phpBB® Forum Software