首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

对象关闭时,不允许操作。解决方法

2012-04-09 
对象关闭时,不允许操作。ADODB.Recordset错误800a0e78对象关闭时,不允许操作。/ok.asp,行219---------------

对象关闭时,不允许操作。
ADODB.Recordset   错误   '800a0e78 '  

对象关闭时,不允许操作。  

/ok.asp,行   219  


----------------------------------------

if   request( "action ")= "xx_del "   and   request( "xxid ") <> " "   then
                set   rs=Server.CreateObject( "ADODB.Recordset ")
sql= "select   *   from   article   where   id= "&abs(request( "xxid "))
rs.open   sql,conn,1,3
if   rs.eof   then
response.write( " <script> alert( '没有该文章! ');history.go(-1) </script> ")
response.end
end   if
                htmlxd_url=rs( "htmlurl ")
                sch_class_id=rs( "class ")
                sch_city_id=rs( "city ")
                rs.delete
                rs.update
                rs.close
sql= "delete   *   from   reply   where   articleid= "&abs(request( "xxid "))
                rs.open   sql,conn,3,3
                rs.update                                   ------------219行
                rs.close
                set   rs=nothing

                call   sc_class_html(sch_city_id,sch_class_id)

Set   fso   =   Server.CreateObject( "Scripting.FileSystemObject ")
fso.DeleteFile(Server.MapPath( "/ "&web_path& "html/ "&xxsc_Path&htmlxd_url))
fso.DeleteFile(Server.MapPath( "/ "&web_path& "html/hf/hf_ "&abs(request( "xxid "))& ".js "))
fso.close
set   fso=nothing
response.write( " <script> alert( '删除成功! ');this.location.href= 'user_xxgl.asp ' </script> ")
end   if

[解决办法]
rs.close之后重新set rs=Server.CreateObject( "ADODB.Recordset ")即可

[解决办法]
if request( "action ")= "xx_del " and request( "xxid ") <> " " then
set rs=Server.CreateObject( "ADODB.Recordset ")
sql= "select * from article where id= "&abs(request( "xxid "))
rs.open sql,conn,1,3
if rs.eof then
response.write( " <script> alert( '没有该文章! ');history.go(-1) </script> ")
response.end
end if
htmlxd_url=rs( "htmlurl ")
sch_class_id=rs( "class ")
sch_city_id=rs( "city ")
rs.delete
rs.update
rs.close
set rs=Server.CreateObject( "ADODB.Recordset ")———————(加上这个试一下)
sql= "delete * from reply where articleid= "&abs(request( "xxid "))
rs.open sql,conn,3,3
rs.update ------------219行
rs.close


set rs=nothing

call sc_class_html(sch_city_id,sch_class_id)

Set fso = Server.CreateObject( "Scripting.FileSystemObject ")
fso.DeleteFile(Server.MapPath( "/ "&web_path& "html/ "&xxsc_Path&htmlxd_url))
fso.DeleteFile(Server.MapPath( "/ "&web_path& "html/hf/hf_ "&abs(request( "xxid "))& ".js "))
fso.close
set fso=nothing
response.write( " <script> alert( '删除成功! ');this.location.href= 'user_xxgl.asp ' </script> ")
end if

热点排行