Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. .NET TRANSACTION

.NET TRANSACTION

Scheduled Pinned Locked Moved ASP.NET
csharptutorialdatabasexmlhelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AumSingh
    wrote on last edited by
    #1

    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

    L C 2 Replies Last reply
    0
    • A AumSingh

      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

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • A AumSingh

        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

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        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 )

        A 1 Reply Last reply
        0
        • C Christian Graus

          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 )

          A Offline
          A Offline
          AumSingh
          wrote on last edited by
          #4

          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?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups