How to stop a recursive trigger in db2!!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to stop a recursive trigger in db2!!

  1. #1
    Rodrigo Guest

    How to stop a recursive trigger in db2!!


    Hi
    I am trying to make a recursive trigger on a table in my db...i am using
    db2...the problem is to how to stop the recursive trigger because it runs
    after a table update and one of the statements is to update a column in the
    table that the trigger run...I found a way in a book, to put "!" caracter,
    but db2 control center or command center don't accept the sintaxe...
    please, i need a help
    thanks
    Rodrigo

  2. #2
    D. Patrick Hoerter Guest

    Re: How to stop a recursive trigger in db2!!

    Rodrigo,

    Well, I'm no DB2 expert, but could you set a state variable in a
    temporary location (such as a row in a temp table), keyed by your session
    id? In SQL Server, if you want to implement transaction-static variables,
    that is one way to go. Set the value at transaction start, check it inside
    the trigger, and abort if necessary. At transaction commit time, release
    that state variable. (More simply, on SQL Server, is to simply disallow
    nested triggers).

    Regards,
    D. Patrick Hoerter

    Rodrigo <rveiga@brq.com> wrote in message news:3a38d995$1@news.devx.com...
    >
    > Hi
    > I am trying to make a recursive trigger on a table in my db...i am using
    > db2...the problem is to how to stop the recursive trigger because it runs
    > after a table update and one of the statements is to update a column in

    the
    > table that the trigger run...I found a way in a book, to put "!" caracter,
    > but db2 control center or command center don't accept the sintaxe...
    > please, i need a help
    > thanks
    > Rodrigo




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center