0

我有一个按钮,我希望在其中执行这个MySQL 命令“update ix.masterlist set 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
4

0 回答 0