Du skal bare ændre SqlCommand.CommandText
i stedet for at oprette en ny SqlCommand
hver gang. Der er ingen grund til at lukke og genåbne forbindelsen.
// Create the first command and execute
var command = new SqlCommand("<SQL Command>", myConnection);
var reader = command.ExecuteReader();
// Change the SQL Command and execute
command.CommandText = "<New SQL Command>";
command.ExecuteNonQuery();