对象关闭时,不允许操作
<%do while not rs.eof
if aa> =rs( "D_Date ") then
DstMobile=rs( "D_Dst ")
SmsMsg=rs( "D_Msg ")
sName=rs( "Name ") '用户账号
sPwd=rs( "Pwd ") '用户密码
ID=rs( "id ")
if SendSms(sName,sPwd, DstMobile, SmsMsg) then
set rs_del=Server.CreateObject( "ADODB.Recordset ")
exec= "delete from nh_dfsms where id= "&ID
rs_del.open exec,conn
response.write "发送成功! "
else
response.write "发送失败! "
end if
end if
response.write(SmsMsg)
rs.movenext
loop
%>
数据库中删除了id所对应的行,但页面出错:对象关闭时,不允许操作
------解决方案--------------------费那事儿干嘛??
set rs_del=Server.CreateObject( "ADODB.Recordset ")
exec= "delete from nh_dfsms where id= "&ID
conn.execute exec
------解决方案--------------------conn.execute exec 就可以了,不需要rs_del