Subject | Re: [firebird-support] Trigger is not 100% |
---|---|
Author | Woody (TMW) |
Post date | 2003-11-03T17:37:22Z |
> My setup is this I have table A and table B. I have a afterinsertI haven't ever seen this. Perhaps there is a place in your code where a
> trigger on table B that could update a record on table A. For example
>
> table A fields
> --------------
> itemid
> itemname
> requestqty
>
> table B fields
> --------------
> itemid
> requestdate
> request
>
> my trigger on afterinsert on table B is this ...
>
> update table A
> set requestqty = requestqty + new.request
> where itemid = new.itemid
>
> I have encountered that there are times that after a record was
> inserted on the table B... the record on the table A wasn't not updated.
>
> For me this is very annoying it causes my data to be not synchronize.
> Is there a bug? Does any one experience this one where sometimes it
> seems that the trigger wasn't triggered after all.
record gets inserted into table B before the request amount gets set.
Effectively, this would add 0 to the table A record. That's about the only
thing I can think of that would cause this. (Barring a known bug that I
don't know about :)
Woody (TMW)
Freeware Page: http://users.eonet.net/woodytmw
All computers wait at the same speed.