My update textbox is named: updateref and my data field I am trying to update with the selected column is refid
I am sorry I am a noob and all new to integrating mysql with vb.net, any help would be appreciated! Thank you!
'MYSQL CODE
Dim con As MySqlConnection = New MySqlConnection("my info")
Dim reader As MySqlDataReader
Try
con.Open()
Dim query As String
Dim command As MySqlCommand
query = "UPDATE exploitsociety SET reffer='" + updateref.Text + "' WHERE reffer='" + DataGridView1.CurrentCell.Selected + "';"
command = New MySqlCommand(query, con)
reader = command.ExecuteReader
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
con.Dispose()
End try
con.Close()
Basially I was wanting to just edit the column data in the dataviewgrid then just hit update but it was to complicated so I added a textbox to see if I could do it that way and I couldn't either.
See Question&Answers more detail:os