我有一个按钮,我希望执行 MySQL命令:“更新ix.masterlist设置DIVISION = replace(DIVISION,'01','HRD')”
我该怎么做?
这就是我在代码中所拥有的,但它没有做任何事情。
Try
Dim cmd As MySqlCommand = New MySqlCommand
Dim strsql As String
strsql = "update ix.masterlist set DIVISION = replace(DIVISION,'01','HRD')"
cmd.CommandText = strsql
dataAdap.SelectCommand = cmd
cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox("Repclaced the Records")
End Try