I need to call MySql procedure as a plain text. Proced开发者_如何学编程ure has output parameter.
I'm not interested in returned data. What do I need to pass as output parameter to ignore it?PS:
I know that using of SqlParameters is good and safe, but it is not my case.
Is this what you are looking for?
SqlConnection mySqlConnection = ConnectDB();
SqlCommand mySqlCommand = mySqlConnection.CreateCommand();
mySqlCommand.CommandText =
@"
SQL QUERY HERE
";
mySqlConnection.Open();
mySqlCommand.ExecuteNonQuery();
mySqlConnection.Close();
精彩评论