If your dataprovider (I assume SQL Server in this case) supports
System.Transactions (Sql Server ado.net provider does) then you don't need
explicit begin/end transaction syntax as those are taken care by
TransactionScope.
--
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/ [quoted text, click to view] <dontspammenow@yahoo.com> wrote in message
news:1191181920.460855.294050@50g2000hsm.googlegroups.com...
> Transactions with .NET 2.0.
>
> If I code this in C# method:
>
>
> Customer objCust = new Customer();
>
> using(TransactionScope scope=new TransactionScope())
> {
>
> objCust.UpdateData(); // updates customer record via stored
> procedure with a standard excutenonquery
> scope.Complete();
>
> }
>
> Is it necessary to then put in the SQL Server Stored Procedure SQL a
> Begin Transaction/End Transaction syntax, or is this already taken
> care of with the above code?
>