I want to execute this stored procedure from a C# program.
I have written the following stored procedure in a SqlServer query window and saved it as stored1:
Calling Store Procedure in C#
SqlCommand cmd = new SqlCommand("StoreProcedureName",con); cmd.CommandType=CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@value",txtValue.Text); con.Open(); int rowAffected=cmd.ExecuteNonQuery(); con.Close();