Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Scope of InTransaction??
Wed, Dec 2 2020 10:21 PMPermanent Link

Ian Branch

Avatar

Hi Team,
I had recently reported to me an error.."ElevateDB Error #300 Cannot lock the table ChangesLog in the schema Default for transaction access."
Ok.  Fair enough.  Somebody else had the ChangesLog table open.
Seeking to mitigate the consequences I had a look at InTransaction.
Slightly confusing as to its applicability/usability.
In the above example, the Transaction couldn't start due to the other use of ChangesLog.  Would the use of InTransaction test before the StartTransaction have captured/prevented this?
If not, then IIUC, I need to capture the #300 error and process it.

And the answer is??

Regards & TIA,
Ian
Wed, Dec 2 2020 10:52 PMPermanent Link

Raul

Team Elevate Team Elevate

On 12/2/2020 10:21 PM, Ian Branch wrote:
> I had recently reported to me an error.."ElevateDB Error #300 Cannot lock the table ChangesLog in the schema Default for transaction access."
> Ok.  Fair enough.  Somebody else had the ChangesLog table open.
> Seeking to mitigate the consequences I had a look at InTransaction.
> Slightly confusing as to its applicability/usability.

It only applies to the current session (yours).

> In the above example, the Transaction couldn't start due to the other use of ChangesLog.  Would the use of InTransaction test before the StartTransaction have captured/prevented this?

No.

inTransaction can be used to check if you (your session) has started a
transaction - in this case you should not call StartTransaction again.


> If not, then IIUC, I need to capture the #300 error and process it.
>
> And the answer is??

StartTransaction will throw an exception of not being able to obtain a
lock and yes so you should handle it and then proceed based on whatever
the logic is.


Raul
Thu, Dec 3 2020 4:23 AMPermanent Link

Ian Branch

Avatar

Hi Raul,
Tks.

Cheers.
Ian
Image