title: C# cant get data from database table in combobox
body: <p>when i load my application i need to fill the combobox <code>cbkeuze</code> with the row <code>loginnaam</code> from table <code>gebruik</code></p>
  
  <p>The error I am getting is: Can't change the items because property Data Source is set.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>private void Form1_Load(object sender, EventArgs e)
          {
              // SQL Connectie opzetten
              SqlConnection Conn = new SqlConnection();
              Conn.ConnectionString = @"Integrated Security=true;Initial Catalog=Wachtwoord;Data Source=LAPTOP-PDI9B3LP\SCHOOL";
              Conn.Open();
  
              SqlCommand cmd = new SqlCommand();
              cmd.Connection = Conn;
              // Alles selecteren van tabel Favorieten
              cmd.CommandText = "select * from gebruik";
              SqlDataReader dr = cmd.ExecuteReader();
  
              while (dr.Read())
              {
                  // Tabel wegschrijven in Applicatie
                  string loginnaam = dr.GetString(0);
                  cbKeuze.Items.Add(loginnaam);
              }
              dr.Close();
              // Database connectie sluiten
              Conn.Close();
          } 
  </code></pre>