please help my in update vb.net to mysql server : Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim con As New MySqlConnection("host=localhost; username=root; password=; database=wh_db")
        Dim cmd As New MySqlCommand
        Dim dr As MySqlDataReader

        con.Open()
        cmd.Connection = con
        cmd.CommandText = " select pass from user where pass ='" & oldpass.Text & "'"

        dr = cmd.ExecuteReader
        If dr.HasRows Then

            cmd.Connection = con
            cmd.CommandText = " UPDATE user SET pass ='" & newpass.Text & "' where user = '" & user.Text & "'"

        Else
            MsgBox("Password is not correct")

        End If
    End Sub
End Class