这是用button键删除数据库中的某条数据
我的数据库中有name,sex,age,credit,brithday 数据库命名为:data
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
objconn.Open()
Dim strdel As String = " Delete from data where name=" & TextBox5.Text
Dim objcmd As New OleDbCommand(strdel, objconn)
objcmd.ExecuteNonQuery()
objconn.Close()
objdset.Tables("data").Rows(mybind.Position).Delete()
objdset.Tables("data").AcceptChanges()
End Sub
为什么老是会出现这个
请高人指点一下,怎么解决这个问题