title: ExecuteReader CommandText property has not been properly initialized
body: <p>First of all sorry if some of the code isn't right. I'm still new to using sql on vb.net</p>
  
  <p>I have the following code:</p>
  
  <pre><code>Imports MySql.Data.MySqlClient
  Imports System.Data.SqlClient
  
  Public Class Form1
  
      Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
          Dim objConn As MySqlConnection
          Dim objDataset As New DataSet
          Dim objDataAdapter As MySqlDataAdapter
          Dim myCommand As MySqlCommand
  
          Dim sqlConn As String
  
          objConn = New MySqlConnection("server=localhost;userid=root;database=attendance_system")
          myCommand = objConn.CreateCommand
  
          objConn.Open()
          Dim objReader As MySqlDataReader = myCommand.ExecuteReader
  
          sqlConn = "SELECT student_name FROM profile"
          objDataAdapter = New MySqlDataAdapter(sqlConn, objConn)
          objDataAdapter.Fill(objDataset, "profile")
  
          MsgBox("The Connection is Now 'OPEN'")
  
          objReader.Read()
  
          TextBox1.Text = objReader("student_name")
  
          objReader.Close()
          objConn.Close()
      End Sub
  End Class
  </code></pre>
  
  <p>I am using MySQL connector via vb.net in phpmyadmin and have set a database with records.
  The connection string is working, but my problem is when I try to click the button to load the data in the textbox, I keep getting: </p>
  
  <blockquote>
    <p>The CommandText property has not been properly initialized." </p>
  </blockquote>
  
  <p>The error is on this line:</p>
  
  <pre><code>"Dim objReader As MySqlDataReader = myCommand.ExecuteReader"
  </code></pre>
  
  <p>I've tried a lot of fixes that I've found on this site and the others as well. </p>