title: Database values in textbox if select Combobox vb.net mysql
body: <p>i cant figure out my problem there is no error but value in combobox not showing from mysqldatabase
  here is my code</p>
  
  <pre><code>    Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  
      Dim conn As New MySqlConnection
  
      conn.ConnectionString = "server=localhost;user vbid=root;password=admin;database=dnidb"
  
      Dim reader As MySqlDataReader
  
      Try
          conn.Open()
          Dim query As String
          query = "select * from dnidb.hargapro where NamaP = '" &amp; ComboBox1.Text &amp; "'"
          command = New MySqlCommand(query, conn)
          reader = command.ExecuteReader
          While reader.Read
              TextBox8.Text = reader.GetInt32("HargaP")
            End While
          conn.Close()
      Catch ex As Exception
          MessageBox.Show(ex.Message)
      Finally
          conn.Dispose()
      End Try
  
  
  End Sub
  </code></pre>
  
  <p>this code was no error, but didnt show anything in the combobox, i try to make this cone on combobox_selectedindexchanges and same thing nothing showing up in the combobox</p>
  
  <p>i just follow the code from here
  <a href="https://www.youtube.com/watch?v=HfnoGEmRGvc" rel="nofollow noreferrer">https://www.youtube.com/watch?v=HfnoGEmRGvc</a></p>