title: ExecuteReader: CommandText property has not been initialized when trying to make a register form for my database
body: <p>hello guys im trying to script a register form for my database and i came with this code >> so can anyone help ?       </p>
  
  <pre><code>Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
      Dim cn As New SqlConnection
      Dim cmd As New SqlCommand
      Dim dr As SqlDataReader
  
      cn.ConnectionString = "Server=localhost;Database=test;Uid=sa;Pwd=fadyjoseph21"
      cmd.Connection = cn
      cmd.CommandText = "INSERT INTO test2(Username,Password) VALUES('" &amp; TextBox1.Text &amp; "','" &amp; TextBox2.Text &amp; "')"
      cn.Open()
      dr = cmd.ExecuteReader
      If dr.HasRows Then
          MsgBox("You're already registered")
      Else
          MsgBox("Already registered")
      End If
  End Sub
  </code></pre>