MySqlScript within a transaction
What is the c# code to MySqlScript in a transaction?
I have this code but it does not execute within a transaction.
MySqlConnection MySQLConn = new MySqlConnection("server=xx.xx.xx.xx;User=user;database=mydb;port=3306;password=xxxx;");
MySQLConn.Open();
MySqlTransaction MySQLConnScriptTrans;
MySQLConnScriptTrans = MySQLConn.BeginTransaction();
try
{
MySqlScript MySQLConnScript = new MySqlScript(MySQLConn, SQL);
MySQLConnScript.Execute();
MySQLConnScriptTrans.Commit();
}
catch (Exception ex)
{
MySQLConnScriptTrans.Rollback();
}
Subject
Written By
Posted
MySqlScript within a transaction
October 13, 2021 11:52AM
November 01, 2021 10:00AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.