Denis Palnitsky
Denis Palnitsky

Reputation: 18387

Calling stored procedure ignoring output parameters

I need to call MySql procedure as a plain text. Procedure 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.

Upvotes: 1

Views: 580

Answers (1)

Martin
Martin

Reputation: 10563

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

Upvotes: 1

Related Questions