Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to add child records in code
Message
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Best way to add child records in code
Environment versions
Environment:
VB.NET 1.1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01001895
Message ID:
01001895
Views:
64
Hi All,

I'm new to MM and am trying to add some child records in code within a business object each time a new parent record is created. As I create the child records, I'd like to be able to make use of all the MM capabilities (business rule testing, error trapping, primary key / foreign key handling, etc.) and would appreciate a "best practices" recommendation for how to do this within MM.

I have two tables (at this point managed by two business objects): DocHead (parent) and DocItem (child). These both have autoincrement PKs (DocHeadID and DocItemPK) and they should always have a one-to-many relationship based on DocHead.DocHeadID = DocItem.DocHeadID.

Each time the user creates a new DocHead record, I'd like it's business object to also create 5 related DocItem records and return all of these new records to the form for editing.

Thanks in advance,
Larry Tucker
Next
Reply
Map
View

Click here to load this message in the networking platform