请大家看看我的代码错在那里!~~
Dim strCon1 As String = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = hjlotus.mdb "
Dim myconn1 As New OleDb.OleDbConnection(strCon1)
myconn1.Open()
Dim strdel As String = "delete kcb where 库存货号= ' " & _TextBox1.Text & " ' "
Dim myCommand1 As OleDb.OleDbCommand = New OleDb.OleDbCommand(strdel, myconn1)
myCommand1.ExecuteNonQuery()
myconn1.Close()
我要作的是删除符合条件记录
提示这一句出错:myCommand1.ExecuteNonQuery()
[解决办法]
语句加上from
delete from kcb where 库存货号= ' " & _TextBox1.Text & " ' "