public void fillComboboxSourceName(ComboBox combobox) { combobox.Items.Clear(); connection = new DBConnection(); sourceDB = new SourceDB(); SqlDataReader reader = sourceDB.fillComboboxSourceName(); while (reader.Read()) { combobox.Items.Add(reader["sourceName"]); } connection.close(); }