Normal Topic [Solved] Reparenting (Read 584 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
[Solved] Reparenting
Feb 2nd, 2008 at 4:29am
Print Post Print Post  
Solution: To use the simple reparenting tool, there must be only one natural link between the parent database and subrecord database.

I was unable to make Reparenting work with 2.0.5 today.
Parent form only has one record.  Has a text value in a text element,A.  Has subform to Child, natural links.
Four children records exist, were imported from ASC file.  Have the same text value in a text element.B.

Opened subformChild, did locate orphans, and all four records were in the result set.  Confirmed value in element B matched value in Parent element A.

Selected Reparent, selected element A in the parent, selected element B in the child.
Clicked Accept, and got message that process failed.
Got a second message: "Both a parent key field and a child key field must be selected.

« Last Edit: Feb 3rd, 2008 at 2:12pm by Hammer »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Reparenting
Reply #1 - Feb 2nd, 2008 at 1:47pm
Print Post Print Post  
I know that last weekend a conversion using this tool on tens of thousands of subrecords went off without a hitch.

Do you have more than one link between the parent database and the sub database? The simple reparent tool only works if there is a single natural link.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Reparenting
Reply #2 - Feb 2nd, 2008 at 2:02pm
Print Post Print Post  
There is also a relational link to this subform.  I will try removing that to see results.  Gotta go to SANE meeting now, maybe we will resolve it there.....  Thanks for the info.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Reparenting
Reply #3 - Feb 3rd, 2008 at 5:51am
Print Post Print Post  
Well, I removed the relational subform but that did not correct it.  Some more digging and I found that the Parent form had multiple "subform" type fields listed in the Tree Branch to Manage a Database.  Instead of only one, I had about 4 fields listed with the Type of SUBFORM.  So, I deleted them all, and removed all subforms from the Parent form.

I then created a new subform with natural links.  Made sure that name of the subform field matched the exact spelling of an existing subform field name.  Opened the subform, looked for orphans and found four of them.  Did Reparent process, saw nothing happening.  Checked again for orphans, and found none.  Then opened the Parent form, and found 4 records on the subform for the child, exactly as expected.

So, problem solved.  I suspect it was because of old subform type fields in the Parent form.  (Could these have been the result of some earlier XML import problems)?    

Suggestion:  Provide some type of status message when the Reparenting process has been completed.  Similar to the mesage when orphans are found, something like this:  "4 records have been reparented".

This is a major improvement for use when importing data into subforms.   Cool
Thanks again, keep up the good work. Smiley
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged