I am facing following problem:
I have to implement a .Net Webservice in C#. This Webservice receives 2 Objects (O1, O2).
To save the objects to the DB, i have to call a stored procedure for O1 and O2.
But, if the procedure for O2 fails, the changed which was performed by procedure 1 (for O1) should be "rollbacked".
In other words, I have to scope these two procedures with a transaction.
I have read about the "transaction support for XML Web services" in .Net and the tag "TransactionOption = TransactionOption.Requires
New". (see: http://www.codeproject.com/KB/XML/TransactionASPNET.aspx
But it didn't work when I was testing it - O1 was committed to the DB although O2 failed.
Any suggestions what I am doing wrong?
Maybe this "transaction support" does not work when using stored procedures?
Im using .net 3.5 and MSSQL-Server 2008 R2.