Subject Re: [firebird-support] Firebird 1.5 RC9 - Error 335544332 Invalid Transaction Handle
Author Helen Borrie
At 10:51 PM 15/02/2004 +0000, you wrote:
>Hi All
>
>I'm running a Delphi app against Firebird 1.5 RC9 and I am getting
>occasional errors of the following form:
>
>ISC ERROR CODE:335544332
>ISC ERROR MESSAGE: invalid transaction handle (expecting explicit
>transaction start)
>
>I've read through all the advice I can find and have tried the
>following:
>
>I have ensured that I only have Firebird 1.5 RC9 installed on my
>system.
>
>I have only the one copy of gds32.dll that comes with Firebird 1.5
>RC9 anywhere on my system.
>
>My Delphi app is multi-threaded. I have ensured that each thread has
>it's own connection, transaction and session component.
>
>I'm out of ideas now. Can anyone else tell me why I might be
>getting this error?

The transaction handle is a client thing. It is "valid" (i.e. associated
with a transaction ID on the server) only between START TRANSACTION and
COMMIT (or ROLLBACK). If you use AUTOCOMMIT on your transaction, COMMIT
WITH RETAIN is used and the transaction context survives. If you don't,
the transaction handle becomes invalid.

The next START TRANSACTION will acquire a new transaction handle.

Somewhere, you app is trying to pass a request with no transaction
running. This could show up where you've had an exception handler in a
try..except block that ended the transaction; and your Prepare, Open or
Execute handler isn't testing transaction.InTransaction...

/heLen