title: How to use the selected value in ComboBox to the SQL query?
body: <p>When I choose a value in ComboBox. How can I use them to query SQL??</p>
  
  <p>I tried</p>
  
  <pre><code>private void cmb1_SelectedIndexChanged(object sender, EventArgs e)
  {
     string select = this.cmb1.GetItemText(this.cmb1.SelectedItem);
     cm1 = new SqlCommand("select VS from DATABASE where ROUND=select", con);
     ap = new SqlDataAdapter(cm1);
     ds = new System.Data.DataSet();
     ap.Fill(ds, "DATABASE");
     cmb2.DataSource = ds.Tables[0]; 
     cmb2.DisplayMember = "VS"; // show in combobox2
  }
  </code></pre>
  
  <p>I want to use the variable <code>select</code> to query but it doesn't work.</p>