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. General Programming
  3. C#
  4. Sqlserver Triggers

Sqlserver Triggers

Scheduled Pinned Locked Moved C#
databasehelpquestion
5 Posts 5 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.
  • U Offline
    U Offline
    User 4005525
    wrote on last edited by
    #1

    Hi, I want to return a trigger when new row is inserted or existing row is updated. if a row is inserted ,i have to return a trigger to my application.Later it is executed by our application to push data into our local database. It's urgent. can anyone help me for this? thanks sri

    C C N R 4 Replies Last reply
    0
    • U User 4005525

      Hi, I want to return a trigger when new row is inserted or existing row is updated. if a row is inserted ,i have to return a trigger to my application.Later it is executed by our application to push data into our local database. It's urgent. can anyone help me for this? thanks sri

      C Offline
      C Offline
      Christian Wikander
      wrote on last edited by
      #2

      Why do you need your application to handle this? It seems like a bad idea. What if you write a second program that updates the data and forget about the trigger thing. Write a database trigger for Insert and/or Update or write a Stored Procedure that updates or inserts the data and does whatever other things you want done at the same time.

      1 Reply Last reply
      0
      • U User 4005525

        Hi, I want to return a trigger when new row is inserted or existing row is updated. if a row is inserted ,i have to return a trigger to my application.Later it is executed by our application to push data into our local database. It's urgent. can anyone help me for this? thanks sri

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

        Member 4008492 wrote:

        It's urgent

        Of course it is. Triggers don't do that, they fire IN the DB.

        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 )

        1 Reply Last reply
        0
        • U User 4005525

          Hi, I want to return a trigger when new row is inserted or existing row is updated. if a row is inserted ,i have to return a trigger to my application.Later it is executed by our application to push data into our local database. It's urgent. can anyone help me for this? thanks sri

          N Offline
          N Offline
          Nissim Salomon
          wrote on last edited by
          #4

          Hi Use the DB triggers (INSERT, UPDATE) in order to log the changes that occur on the table, then use that log todo what ever you want

          1 Reply Last reply
          0
          • U User 4005525

            Hi, I want to return a trigger when new row is inserted or existing row is updated. if a row is inserted ,i have to return a trigger to my application.Later it is executed by our application to push data into our local database. It's urgent. can anyone help me for this? thanks sri

            R Offline
            R Offline
            Rob Graham
            wrote on last edited by
            #5

            Do a search on "SQL Server Notifications". Triggers fire in the database, and are not what you need here, but notifications might work for you.

            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