title: How to add items to a comboBox in C# from two tables?
body: <p>I'd really appreciate if someone could help me figure out how to fill two comboboxes data from two different tables. The code below doesn't seem to be working for me.</p>
  
  <pre><code>string command = "SELECT * FROM [Course]";
  string command2 = "SELECT * FROM [Module]";
  dbConnection db = new dbConnection();
  SqlDataReader reader = db.commandExecute(command);
  SqlDataReader reader2 = db.commandExecute(command2);
  
  while (reader.Read())
  {
      comboBox2.Items.Add(reader["CourseID"].ToString());
  }
  while (reader2.Read())
  {
      comboBox1.Items.Add(reader["ModuleID"].ToString());
  }
  
  reader.Close();
  reader2.Close();
  db.connectionEnd();
  </code></pre>