Click here to Skip to main content
14,929,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am having to tables let e.g.
Product{Id int(PK),Name varchar(50),InvoiceId int as Foreign key} 
and another table
Invoice{Id int(PK) ,Date date}
If invoice have more than one item then how can I insert values through Stored Procedure so that data consistency maintained. if I add invoice then all product must be added otherwise transaction must be rollback. Thanks

1 solution

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