Click here to Skip to main content
15,895,786 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have been trying to create an application using the typed dataset.
When updating, inserting and deleting records of single table everything works fine.

But, when I am trying to operate on forms dealing with 2 tables (parent & child), insertion is not working. Reason for this is, Primary-Key is generated from the database after insertion.
The child rows are having a negative value for the foreign-key before saving. It was working fine, until I added a record in the master table manually.

Please help me. Thank you, All.
Posted

1 solution

You can manage it by the help of "TRANSACTION"
AND Best is to insert child record in the After Insert trigger of the parent table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900