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. problem in transaction .

problem in transaction .

Scheduled Pinned Locked Moved ASP.NET
databaseoraclehelp
2 Posts 2 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.
  • S Offline
    S Offline
    souravghosh18
    wrote on last edited by
    #1

    in my situation in one click event i have to insert data into a sql table as well as oracle table.Now i want to use transactions but the problem is either i have to use oracle transaction which does not support oracle command or sql transaction which does not support sql command.What i have to do in this situation.I want to do that if one of the two query fails to execute other one must be roll back. Thanx in advance

    M 1 Reply Last reply
    0
    • S souravghosh18

      in my situation in one click event i have to insert data into a sql table as well as oracle table.Now i want to use transactions but the problem is either i have to use oracle transaction which does not support oracle command or sql transaction which does not support sql command.What i have to do in this situation.I want to do that if one of the two query fails to execute other one must be roll back. Thanx in advance

      M Offline
      M Offline
      Mark Graham
      wrote on last edited by
      #2

      I've never had to deal with transactions across two different providers (oracle and sql server) before but here's something off the cuff. How about adding some kind of 'Pending' state to the inserts 1. Perform first insert (pending) 2. Perform second insert (pending) 3. Validate both have inserted 4. Update first (live) 5. Update second (live) I know there's still a window for something to fail between operations 4 and 5 but it's much less likely than a failure between 1 and 2 (due to constraints you might have on various fields). A Transaction would be better but this is an option.

      Mark Graham (MCP) // The Doodler blogging at: dotnet notepad

      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