Subject | RE: [IBO] Re: Problem with triggers |
---|---|
Author | Helen Borrie |
Post date | 2004-04-07T00:06:08Z |
At 04:49 PM 6/04/2004 -0400, you wrote:
suggests that the ib_dsql is already in a transaction with a different
transaction than the one you thought, i.e. the default transaction.
A prepare has to occur inside the context of a transaction, you see; and a
transaction has to have at least one connection context. It's the
*statement* that gets prepared, you see. Your statement will prepare
within a certain transaction and all that prepared stuff belongs to the
transaction that prepared it.
You have two transactions playing in this sandbox, where you need to have
one, i.e. the one that you are controlling in the code.
Helen
>Just a note to all, I got everything working just fine. There was never aYes: it sounds wrong. Could you check the creation order? The AV
>problem
>When I switched these two statements around, such as:
>
>if not IB_Transaction.Started then IB_Transaction.StartTransaction;
>if not Prepared then Prepare;
>
>I got a very nasty exception, trying to read memory at a very low address.
>Both the IB_Transaction: TIB_Transaction; and the IBODQuery: TIB_DSQL;
>where components I dropped on my DataModule form. Also as another point in
>interest, I was able to hook the TIB_DSQL component up to my connection,
>but the TIB_Transaction would not allow me to select the connection as
>design time. (It kept going back to Default)
>
>Any thoughts on this?
suggests that the ib_dsql is already in a transaction with a different
transaction than the one you thought, i.e. the default transaction.
A prepare has to occur inside the context of a transaction, you see; and a
transaction has to have at least one connection context. It's the
*statement* that gets prepared, you see. Your statement will prepare
within a certain transaction and all that prepared stuff belongs to the
transaction that prepared it.
You have two transactions playing in this sandbox, where you need to have
one, i.e. the one that you are controlling in the code.
Helen