Problems refreshing DataGridView after database update in VB.NET

Posted by Gbolahan on Stack Overflow See other posts from Stack Overflow or by Gbolahan
Published on 2010-06-11T13:45:57Z Indexed on 2010/06/11 14:02 UTC
Read the original article Hit count: 485

Filed under:
|
 Dim myQuery = "UPDATE table1 SET data= CONCAT (data,'" & vbCrLf & "[ " &       Date.Now() & " ]" & " " & "[" & getCN() & "]" & " " & txtTelenotes.Text & "[ item1 ]" & "') WHERE id='" & txtID.Text & "'"
 myCommand.Connection = conn
 myCommand.CommandText = myQuery

 myAdapter.SelectCommand = myCommand
 Dim myData As MySqlDataReader
 myData = myCommand.ExecuteReader()

 txtTelenotes.Text = ""
 dgvREcord.Refresh()

I tried refreshing the DataGridView using:

  dgvREcord.Refresh()

but it does not load the changes from the database.

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about datagridview