tags:

views:

51

answers:

1

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.

+1  A: 

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();
Martin
Not exact. I need to call "MyStoredProcedure @outputParam"
Orsol