开发者

Calling stored procedure ignoring output parameters

开发者 https://www.devze.com 2023-01-06 18:49 出处:网络
I need to call MySql procedure as a plain text. Proced开发者_如何学编程ure has output parameter.

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();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号