Dim constr As String = ("Database=1234;Data Source=localhost;User Id=root;Password=")
Dim cmd As New MySqlCommand
Dim da As New MySqlDataAdapter
Dim db As New MySqlCommandBuilder
Dim ds As DataSet
Dim sconn As MySqlConnection = New MySqlConnection(constr)
Dim sql As String = "select id,name,tel,ad,t from fi"
Try
ds = New DataSet
da.Fill(ds, "fi")
DataGridView1.DataSource = ds
DataGridView1.DataMember = "fi"
da.SelectCommand = cmd
db.DataAdapter = da
da.Update(ds, "fi")
MessageBox.Show("ปรับปุรุง", "", MessageBoxButtons.OK)
Catch ex As Exception
MessageBox.Show("ไม่สามารถปรับปุรุง", "", MessageBoxButtons.OK)
End Try