Subject Re: [firebird-support] trigger trouble
Author James
James wrote:

>I have a trigger which I made, here is the code.
>
>CREATE TRIGGER "counter_AI0" FOR "counter"
>ACTIVE AFTER INSERT POSITION 0
>AS
>begin
> /* if the payment is an advance then add a credit */
> if (new."Mode" = 'ADV') then
> insert into "suppliercredit"(ID, "PaymentID", "Amount", "Status",
>"Type")
> values (gen_id("gen_suppliercredit",1), new.ID, new."Amount", 'ACT',
>'ADV');
>
>end
>
>The problem is that on the suppliercredit table, the amount field has no
>value at all. I don't the amount field is always null. The amount field
>of both table are both numeric(15,2). I also check the value of the
>amount field in counter table there is no problem at all, but I just
>can't figure it out why the Amount on suppliercredit is always null.
>
>James
>
>
>
>To unsubscribe from this group, send an email to:
>firebird-support-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>
Iam sorry guys. I have try inputting using ibexpert and this triggers
works. I think this is a IBO problem.

Thanks

James