Adding rows to related DataTables !! 
Author Message
 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



Tue, 01 Mar 2005 22:59:12 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Adding new rows to related tables on a dataset

2. Deleting rows from DataTables

3. adding a table row, without setting same defaults as previous row

4. row heights of table rows added by vba

5. Add row to datatable from datagrid without leaving current row with cursor

6. Add Button to a row by row data display

7. Adding to add a row to an unbound DBGrid

8. Opening a form to add related records

9. Need Help in Adding records in the related tables

10. Adding Installation Components - Deployment Related.

11. Add, Delete, Move ... in in a related table

12. Add related file?

 

 
Powered by phpBB® Forum Software