I have the following function in C# which is working fine
private void AddQueue()
{
SqlConnection conn = forconnection();
conn.Open();
SqlCommand cmd = new SqlCommand("spInsertFormIssue",conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Qdatetime", SqlDbType.DateTime).Value = DateTime.Now;
cmd.ExecuteNonQuery();
conn.Close();
}
Now I want the same function but with different stored procedure, I want to reuse this function with another stored procedure.
How do I pass stored procedure as argument?