It is a bad idea to pass SqlConnections around. partly because they are a relatively expensive resource and you may have a limited number of them available. The underlying database drivers will automatically cache SqlConnections for you (AFAIK this uses the connection string as the key for the cache, so always use the same connection string for the same data source).
You should also use the using statement to ensure SqlConnections are disposed in a timely fashion, when you no longer need them. E.g., wrap your call to ExecuteNonQuery with a using statement that creates/opens the SqlConnection:
using (SqlConnection sqlConnection = new SqlConnection(connectionString))
{
sqlConnection.Open();
// Need to define cmdText.
string cmdText = "";
using (SqlCommand sqlCommand = new SqlCommand(cmdText, sqlConnection))
{
sqlCommand.CommandType = CommandType.Text;
sqlConnection.Open();
var result = sqlCommand.ExecuteNonQuery();
sqlConnection.Close();
}
}