
Adding rows to related DataTables !!
Hi :
I have 2 related tables (tblHeader and tblDetails) and I need to add some
rows to each of them at runtime.
The relations is one to many, being tblHeader the parent and tblDetails the
child.
What I do now is:
1. Add the tblHeader row to the dataset.
2. Update the database.
3. Retrieve the HeaderID of the row I just added from database.
4. Add the tblDetails rows using the HeaderID I retrieved on step 3 as the
link field for the relation.
5. Update the database.
Is there any way I can get rid of steps 2 & 3 ?
Thanks again,
Erich