Unix Technical Forum

Trigger Unlimited Recursion Error

This is a discussion on Trigger Unlimited Recursion Error within the Sybase forums, part of the Database Server Software category; --> Hi All. I use ASA. But I do not think that my problem is sybase related. I have table ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 02:39 PM
Damjan
 
Posts: n/a
Default Trigger Unlimited Recursion Error

Hi All.

I use ASA. But I do not think that my problem is sybase related.

I have table A and table B.
On each table I have a trigger that on insert and update
inserts or updates data into the other table.

(this is because I am trying to replace an old system, but
not fully... basically don't ask)

So what happens is that I get unlimited recursion, because
after insert into A, A's trigger gets called, which calls insert into
B which fires B's trigger, which calls insert into A, which fires A's
trigger which calls insert into..... disaster!

Does anyone know of easy/smart/dumb/any way to solve this problem.
Is there a way to pass officially information between triggers.
Is there a way to ask why the trigger is called.
I think not...

What I do now is I introduced another into field into both tables
which noone uses but my triggers. So I use it to comunicate... That
sucks.

Thanks in advance,

Damjan

PS I searched a lot of newsgroups, but found nothing on this topic
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:15 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com