Hi guys,
I want to send this transaction but I got an error.
whather that an IF or Variable declaration I get this error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF (5 > 0) BEGIN PRINT 'hallo' END"..........
what do you think?
thank you.
I want to send this transaction but I got an error.
Code:
string cmdString = @"IF (5 > 0) BEGIN PRINT 'Hi..' END"; MySqlCommand command = new MySqlCommand(cmdString, m_connection); ActivateDatabaseApplicationRole(); using (transaction = m_connection.BeginTransaction()) { Trace.WriteLine("\n\nBEGIN INSERT\n\n"); //AC foreach (OleDbCommand command in sqlCommands) foreach (MySqlCommand command in sqlCommands) { Trace.WriteLine(command.CommandText); command.Transaction = transaction; command.ExecuteNonQuery(); } transaction.Commit(); } transaction = null;
what do you think?
thank you.