title: Reading value from MySql table using VB.NET
body: <p>I'm having trouble trying to read from a MySQL databse using VB.NET, the error message I get is "ArgumentExcpetion was unhandled"</p>
  
  <p>Also, the reading should return 'F', since this is the value allocated on that specific place on the table.</p>
  
  <pre><code>Imports MySql.Data.MySqlClient
  Public Class Form1
      Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
          Application.Exit()
      End Sub
      Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
          Dim query As String = "SELECT DO FROM klein WHERE COMMAND='DELETE'"
          Dim connStr As String = "server=" &amp; TextBox1.Text &amp; ";" _
              &amp; "user id=" &amp; TextBox2.Text &amp; ";" _
              &amp; "password=" &amp; TextBox3.Text &amp; ";" _
              &amp; "database=hidro201_liberato"
          Dim connection As New MySqlConnection(connStr)
          Dim cmd As New MySqlCommand(query, connection)
          connection.Open()
          Dim reader As MySqlDataReader
          reader = cmd.ExecuteReader()
          While reader.Read()
              TextBox4.Text = (reader.GetChar(1))   '&lt;- **problem is here**
          End While
      End Sub
  End Class
  </code></pre>