title: How to make comboBox SelectedValue equal with SQL table ID
body: <p>I Want to control the make EmployeeID in SQL side to be equal to combobox value, so that when I insert update delete, I directly control items by their value. However I get error when I enter this line. Does anyone know why this occurs? </p>
  
  <p><strong>NOTE: KennyZ found the solution. Thank you for help, KennyZ.</strong></p>
  
  <pre><code>    void comboboxrefresh()
      {
          cnn.Open();
          SqlCommand cmd = new SqlCommand("SELECT EmployeeID,EmployeeFirstName,EmployeeLastName FROM Employees", cnn);
          SqlDataReader dr = cmd.ExecuteReader();
          if (dr.HasRows)
          {
              while (dr.Read())
              {
                  comboBox1.Items.Insert(dr.GetString(1) + dr.GetString(2), dr.GetInt32(0));
              }
          }
  
          cnn.Close();
      }
  </code></pre>