Subject | Re: [IBO] IBO detect a wrong numerics field |
---|---|
Author | Helen Borrie |
Post date | 2003-12-14T14:10:48Z |
At 10:08 PM 14/12/2003 +0800, you wrote:
power to see through walls.
will fire the trigger. At that point, the only column containing a value
is ID, because this initial post occurs before you even see the insert
buffer. So the trigger is creating the suppliercredit records at that
point, with ID and two constants. It doesn't have a value for amount,
because you haven't entered it yet.
Problem explained.
If you must have this table 'counter' as a master in your client app, then
you need your trigger to fire on AfterUpdate, not AfterInsert. You will
need to include some logic so your after update trigger only fires if
old.Amount is null.
Helen
>Hi Helen, can you please help me with this one.I have been trying to. It may surprise you to learn that I do not have the
power to see through walls.
> I don't have any ideaYes. The postretaining will post an initial insert for the master, that
>where to start... I have tried many time using ibexpert and it work fine
>after inserting a record on counter table. Yes Helen I don't have a
>before insert trigger in suppliercredit also. In may application code, I
>dont have any code on before or after post of the ib_query.
>One thing that I think of is ... Iam sorry that I didn't mention this
>earlier, I have my counter table setup as a master table in IBO. Could
>it be that since the counter is a master table there is a postretaining
>that is happen that could affect the trigger?
will fire the trigger. At that point, the only column containing a value
is ID, because this initial post occurs before you even see the insert
buffer. So the trigger is creating the suppliercredit records at that
point, with ID and two constants. It doesn't have a value for amount,
because you haven't entered it yet.
Problem explained.
If you must have this table 'counter' as a master in your client app, then
you need your trigger to fire on AfterUpdate, not AfterInsert. You will
need to include some logic so your after update trigger only fires if
old.Amount is null.
Helen