What can i do if InTransaction can't open

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
roky009
Posts: 5
Joined: Tue 30 Jul 2013 12:37

What can i do if InTransaction can't open

Post by roky009 » Thu 28 Jul 2022 17:31

Hello,

When i check InTransaction, if it fails then what can i do?
can i do Rollback?
the codes are as follows:
thank you in advance:

Code: Select all

if(!UniQuery1->Connection->InTransaction)
{
   UniQuery1->Connection->AutoCommit = false;
   UniQuery1->Connection->StartTransaction(); 
   ...........
}
else{
    UniQuery1->Connection->Rollback();  
}

UniQuery1->Connection->AutoCommit = true;

dzhanhira
Devart Team
Posts: 239
Joined: Mon 26 Oct 2020 13:49

Re: What can i do if InTransaction can't open

Post by dzhanhira » Tue 02 Aug 2022 07:50


handsome
Posts: 1
Joined: Mon 08 Aug 2022 01:17

Re: What can i do if InTransaction can't open

Post by handsome » Mon 08 Aug 2022 01:22

As far as I know, the original cause of the errors listed above is cross-database transaction related to the system resource database, this fix should solve it. Users may sometimes see the errors listed above along with the same underlying cause, the conditions under which this fix applies:
1. Databases that are part of an Always-Available Group enabled WITH DTC_SUPPORT = PER_DB.
2. A cross-database transaction involves this database and the SQL Server Edition system resource database.
3. Inside a cross-database transaction, SAVE TRANSACTION is used or joined in memory-optimized tables.
4. See more at run 3

Post Reply