Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent-Child Business Object Relationships
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00104688
Message ID:
00105849
Views:
24
Mat,

>I have a form with two tabs. On the first tab is my primary business object. On the second tab is another business object which is a child of the primary in a one to many relationship. When I run the form the Requery runs perfectly and I get the coresponding child records. I am using the standard toolbar and when I issue a New, I receive the following error when saving:
>
> "A record already exists with some or all of this information. Please reenter."

>I have been able to trap in debugger and I can see it is the child business object that is encountering the error. My question is, what happens when the new is issued? I know their is a blank record added for the primary business object. Is there also automaticaly a blank record for the child object?

It sounds as if the unique key generation for your child business object's InitialSelectedAlias is not set up properly. I recommend USEing the child object's view outside of the application and trying to add multiple records to see if you can reproduce the error.

You can also check the sample Project Manager application for examples of parent/child business objects and how their views/tables are set up properly for automatic unique id generation.

A new record is not added to a child business object unless its "lNewChildOnNewParent" property is set to TRUE (the default is FALSE).

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform