Subject Re: [IBO] Transaction started issue - How is this possible?
Author Andrew
On 08/13/2010 05:36 PM, Joe wrote:
> What happens is that the "Starting Transaction if necessary", and then the "Transaction not started, so starting it." messages appear in the log. The user then gets an exception, saying, "The transaction has already been started.".
>
> How can the transaction already be started if I JUST verified that ScratchTransaction->Started is returning False? Is there something else I should be testing for, other than ScratchTransaction->Started?
>
> This is an intermittent problem. It works fine most of the time, but once in a while this happens. And once it happens, it will keep happening until they close the application and restart it.
the Started property only returns True if StartTransaction has been used
(a physical transaction has been started).
if you have a query that uses this transaction then a logical
transaction may be started when the query goes into an edit state.
so check any queries that use the transaction to see what their state is
before starting the transaction.
as your problem is intermittent it could be caused by a query being in
the edit state before you start the transaction.

Based on the IBO help:
the InTransaction property only returns True after StartTransaction has
been called.
the TransactionIsActive property supposedly works with both implicit and
explicit transaction modes.




[Non-text portions of this message have been removed]