title: Visual basic, fill a combobox
body: <p>This code gives me system.data.datarowview show in combobox.But I want to fill the combo box with data. whats the error?</p>
  
  <pre><code>Dim adclasstecher As New SqlDataAdapter
  Dim tbclassteacher As New DataTable
  If cnSchool.State = ConnectionState.Closed Then cnSchool.Open()
  cmclassteacher.Connection = cnSchool
  cmclassteacher.CommandText = "SELECT * FROM Teachers"
  cmclassteacher.ExecuteNonQuery()
  
  adclasstecher.SelectCommand = cmclassteacher
  adclasstecher.Fill(tbclassteacher)
  
  With cmbclzteachr
      .DataSource = tbclassteacher
      .DisplayMember = "ClassTeacher"
      .SelectedIndex = 0
  End With
  cnSchool.Close()
  </code></pre>