Re: MySqlScript within a transaction
Posted by: Daniel Valdez
Date: November 01, 2021 10:00AM

Hi David,

You could do something like this:

using (var connection = new MySqlConnection(connString))
{
connection.Open();
var transaction = connection.BeginTransaction();
var myCommand = connection.CreateCommand();
myCommand.CommandText = "<your command text>";
var result = myCommand.ExecuteNonQuery();
transaction.Commit();
}

Thanks,
Daniel

Options: ReplyQuote


Subject
Written By
Posted
Re: MySqlScript within a transaction
November 01, 2021 10:00AM


Sorry, only registered users may post in this forum.

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.