.NET TRANSACTION
-
Can anyone help know how to implement transaction in asp .net? Just like the database transaction, can we put some lines of code in a transaction ...for example begin transaction { myMethodToSendMail() //sends email myMethodToWrite() //Writes into an file e.g. xml file myMethodToDB() //updates database } commit Is there any way to achieve the above situation via asp .net using c#? I dont think the class SqlTransaction is the one to use......can anyone help...thanks in advance
-
Can anyone help know how to implement transaction in asp .net? Just like the database transaction, can we put some lines of code in a transaction ...for example begin transaction { myMethodToSendMail() //sends email myMethodToWrite() //Writes into an file e.g. xml file myMethodToDB() //updates database } commit Is there any way to achieve the above situation via asp .net using c#? I dont think the class SqlTransaction is the one to use......can anyone help...thanks in advance
om pr wrote:
Can anyone help know how to implement transaction in asp .net?
No. No one knows how to do that. And if someone did know it certainly would not be Microsoft and they certainly would NOT document it[^]. Good luck, you're going to need it.
led mike
-
Can anyone help know how to implement transaction in asp .net? Just like the database transaction, can we put some lines of code in a transaction ...for example begin transaction { myMethodToSendMail() //sends email myMethodToWrite() //Writes into an file e.g. xml file myMethodToDB() //updates database } commit Is there any way to achieve the above situation via asp .net using c#? I dont think the class SqlTransaction is the one to use......can anyone help...thanks in advance
I am not sure that there is support for such a thing, except that you can send the mail last, and then undo the other steps, if one fails.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
I am not sure that there is support for such a thing, except that you can send the mail last, and then undo the other steps, if one fails.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Hey thanks for the reply Christian, I guess there is a way out. I believe the following class can solve the problem; System.Transactions.TransactionScope Read about it at following URL http://msdn2.microsoft.com/en-us/library/system.transactions.transactionscope.aspx[^] But the problem is that I am working on .NET 1.1 while it is supported on .NET 2.0 and above. Can you suggest some way out?