0

在谷歌搜索 3 小时后,我无法找出这段代码的问题所在。
代码在运行时停止工作ExecuteNonQuery。然后我得到一个超时。从数据库中列出我没有任何问题,但删除是。

Dim con As MySqlConnection = New MySqlConnection("server=" & Me.txt_mysqlHost.Text & "; user id=" & Me.txt_mysqlUser.Text & "; password=" & Me.txt_mysqlPassword.Text & "; database=" & Me.txt_mysqlDatabase.Text)
con.Open()
Dim mySelectQuery As String = "DELETE FROM Lager WHERE Artikelnr = '" & Artikelnr & "'"
Dim myCommand As New MySqlCommand(mySelectQuery, con)
myCommand.ExecuteNonQuery()
con.Close()
4

0 回答 0