I am trying to update a MySQL table in Visual Basic 2015 using the following code inside a button click but getting an error:
Try
stm = "UPDATE company SET CompanyName='" + TextBox4.Text + "';"
conn.Open()
MessageBox.Show("Data Updated")
While myReader.Read()
End While
conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message.ToString())
End Try
The error I get is Object Reference not set to an instance of an object. Any guidance would be appreciated.
Thanks.