>Hi
>
>I want to create a stored procedure that creates a Client record, then it adds a new record into the ClientOrder, ClientStock and ClientReturn tables using the newly created ClientID. However, I want the process to take place so that if any of the subsequent inserts fail, I can rollback all of the tables to the position they were in before the insert into Client (and rollback the Client table too).
>
>I'd want a stored procedure called, for example, SP_Client_Add, and then that stored procedure would call SP_ClientOrder_Add, SP_ClientOrder_Add and SP_ClientReturn_Add. The reason for having the 3 child stored procedures is so that I can also call them individually if need be.
>
>Regards
Please see this blog
How to insert information into multiple related tables and return ID using SQLDataSource
If it's not broken, fix it until it is.
My Blog