Hi ,

In the asp.net application I am working on we use 3 different sqldatasource
objects with each a insert command in it.

I call:
sqldatasource1.Insert();
sqldatasource2.Insert();
sqldatasource3.Insert();

what i want is wrap these three inserts in 1 transaction.
I ve found solutions where only one insert is in the transaction
(http://windowssdk.msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasourcecommandeventargs.aspx).

How can this be solved..?

Re: 3 different sqldatasource insert queries in 1 transaction...? by Miha

Miha
Thu Oct 05 07:24:58 CDT 2006

Use brand new System.Transactions.Transaction class.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Jan" <Jan@discussions.microsoft.com> wrote in message
news:CADE0735-80E5-43B8-B339-E8D7B3E27F08@microsoft.com...
> Hi ,
>
> In the asp.net application I am working on we use 3 different
> sqldatasource
> objects with each a insert command in it.
>
> I call:
> sqldatasource1.Insert();
> sqldatasource2.Insert();
> sqldatasource3.Insert();
>
> what i want is wrap these three inserts in 1 transaction.
> I ve found solutions where only one insert is in the transaction
> (http://windowssdk.msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasourcecommandeventargs.aspx).
>
> How can this be solved..?