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. Database & SysAdmin
  3. Database
  4. Trigger / Transaction problem

Trigger / Transaction problem

Scheduled Pinned Locked Moved Database
helpdatabase
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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I have a problem with triggers and transactions I need to create a trigger after insert on a table but I would like to fire that trigger only after committing the transaction not before the and on the transaction, any body can help me with this problem I will be thankful for that regards Mhmoud Rawas ------------ Software Eng.

    B 1 Reply Last reply
    0
    • L Lost User

      I have a problem with triggers and transactions I need to create a trigger after insert on a table but I would like to fire that trigger only after committing the transaction not before the and on the transaction, any body can help me with this problem I will be thankful for that regards Mhmoud Rawas ------------ Software Eng.

      B Offline
      B Offline
      Bill Dean
      wrote on last edited by
      #2

      Mhmoud, As far as I know triggers cannot be made to work this way. They fire. Period. I would take you logic in the trigger and make a stored procedure out of it. Then call the new stored procedure after you commit the original transaction. You will not have access to Inserted and Deleted but this is the only way I know to do what you describe Hope this helps Bill

      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