nian = Trim(Combo1.Text)
On Error Resume Next
sq = "delete * from dzdb where 进厂日期时间 like '" & nian & "%'"
Adodc3.RecordSource = sq
Adodc3.Refresh
Adodc3.CommandType = adCmdText
Adodc3.Refresh出错,提示“对象关闭时,不允许操作”,但实际上已经删除了。如何解决?
On Error Resume Next
sq = "delete * from dzdb where 进厂日期时间 like '" & nian & "%'"
Adodc3.RecordSource = sq
Adodc3.Refresh
Adodc3.CommandType = adCmdText
Adodc3.Refresh出错,提示“对象关闭时,不允许操作”,但实际上已经删除了。如何解决?
'Adodc3是什麼對像?AdoDC控件嗎?
nian = Trim(Combo1.Text)
On Error Resume Next
sq = "delete * from dzdb where 进厂日期时间 like '" & nian & "%'"
Adodc3.RecordSource = sq '這裡寫錯了
Adodc3.Refresh
Adodc3.CommandType = adCmdText
Adodc3.Refresh
sq = "delete * from dzdb where 进厂日期时间 like '" & nian & "%'"
Adodc3.RecordSource = sq
Adodc3.Refresh
Adodc3.CommandType = adCmdText
Adodc3.Refresh 将中间的哪个 Adodc3.Refresh 去掉试试
sq语句是删除记录,得不到返回的记录集合
你的语句写错了
日期不能这样写的
On Error Resume Next
sq = "delete * from dzdb where 进厂日期时间 like '" & nian & "%'"
Adodc3.RecordSource = sq
Adodc3.Refresh 去掉
Adodc3.CommandType = adCmdText
Adodc3.Refresh