Subject | RE: [IBO] Re: Problem with triggers |
---|---|
Author | Helen Borrie |
Post date | 2004-04-06T00:56Z |
At 04:09 PM 5/04/2004 -0400, you wrote:
Prepared test. If the query needs to be prepared, it won't prepare if it's
not in a started transaction.
To repeat what Marco said - the client side does not --- can not --- have
any influence over whether a trigger fires or not.
If you eliminated the possibility that the after trigger finds no records
to operate on, then the next thing to look at is the possibility that, in
one case, the DML is operating on the table and, in the other, it is
operating on a view. If it's a view, the table triggers won't fire; if
it's a table, the view triggers won't fire.
Helen
>Hi Marco,The sequence is wrong here. The transaction test has to precede the
>
>
>I am using a TIB_DSQL object and the ExecSQL method as follows:
>
> // run the UPDATE
> if not DataAccessMod.IBODQuery.Prepared then
> DataAccessMod.IBODQuery.Prepare;
> if not DataAccessMod.IBODQuery.IB_Transaction.Started then
> DataAccessMod.IBODQuery.IB_Transaction.StartTransaction;
> DataAccessMod.IBODQuery.ExecSQL;
> DataAccessMod.IBODQuery.IB_Transaction.Commit;
Prepared test. If the query needs to be prepared, it won't prepare if it's
not in a started transaction.
To repeat what Marco said - the client side does not --- can not --- have
any influence over whether a trigger fires or not.
If you eliminated the possibility that the after trigger finds no records
to operate on, then the next thing to look at is the possibility that, in
one case, the DML is operating on the table and, in the other, it is
operating on a view. If it's a view, the table triggers won't fire; if
it's a table, the view triggers won't fire.
Helen