7,763
社区成员
发帖
与我相关
我的任务
分享
On Error Resume Next
If rs3.State = adStateOpen Then rs3.Close
SQL = "select * from 报价单 where 物资名称= '" & CStr(Text1(0).Text) & "'"
‘SQL = "select * from 报价单 where 物资名称 Like '%" & Text1(0).Text & "%'"
rs3.Open SQL, cnn, adOpenKeyset, adLockOptimistic
Text4.Text = rs3.RecordCount
If rs3.RecordCount > 0 Then
msg = MsgBox("删除该条记录吗?", vbYesNo)
If msg = vbYes Then
rs3.Delete
End If
End If
现在问题是rs3.RecordCount根本没有返回值,连0都不是,而用注释掉的那句代码却可以正常执行,到底哪里有错误啊