Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to add child records in code
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Best way to add child records in code
Versions des environnements
Environment:
VB.NET 1.1
Database:
MS SQL Server
Divers
Thread ID:
01001895
Message ID:
01001895
Vues:
67
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform