外省的违章怎么交罚款:Microsoft VBScript 运行时错误 错误 '800a000d'

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/05 13:42:08
Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: 'rs2'

/photo/admin/main8_sh1.asp,行51
------------------------------------------
源文件:
<!--#include file="conn.asp"-->
<!--#include file="../config.asp"-->
<!--#include file="login1.asp"-->
<meta http-equiv="Content-Language" content="zh-cn">
<link rel="stylesheet" href="Style.css">
<%dim picid,picidd
picid=request("picid")
if picid="" then
call photoxx("picid参数传递错误。")
response.end
end if

picidd=split(picid,",")
for i=0 to ubound(picidd)
if trim(picidd(i))<>"" then

sql="select * from picmap where id="&trim(picidd(i))
rs.open sql,connphoto,1,3
if rs.eof then
call photoxx("ID所对应的相片信息未找到。")
response.end
end if
if rs("sh")=1 then
rs("sh")=0
else
rs("sh")=1
end if
rs.update
sql="select * from xc where id="&rs("xcid")
set rs1=server.createobject("adodb.recordset")
rs1.open sql,connphoto,1,3
if not rs1.eof then
if isnull(rs1("filename")) or rs1("filename")="" or rs1("filename")=rs("photoslt") then
sql="select * from picmap where xcid="&rs1("id")&" and xs=1 and sh=1"
set rss=connphoto.execute(sql)
if rss.eof then
sql="select * from picmap where xcid="&rs1("id")&" and sh=1"
set rs2=connphoto.execute(sql)
if not rs2.eof then
rs1("filename")=rs2("photoslt")
rs1("photohight")=rs2("photohight")
rs1("photowidth")=rs2("photowidth")
rs1.update
else
rs1("filename")=""
rs1.update
end if
rs2.close
else
rs1("filename")=rss("photoslt")
rs1("photohight")=rs2("photohight")
rs1("photowidth")=rs2("photowidth")
rs1.update
end if
rss.close
end if
end if
rs1.close
rs.close
end if
next

call photoxx("相片操作成功,请返回刷新。")%>
rs2.close '这里出错,execute的记录集不允许使用没有open方法的...^_^..直接set rs2=nothing即可
----------------------------------------------
我把rs2.close '替换为:set rs2=nothing 没有解决问题

<!--#include file="conn.asp"-->
<!--#include file="../config.asp"-->
<!--#include file="login1.asp"-->
<meta http-equiv="Content-Language" content="zh-cn">
<link rel="stylesheet" href="Style.css">
<%dim picid,picidd
picid=request("picid")
if picid="" then
call photoxx("picid参数传递错误。")
response.end
end if

picidd=split(picid,",")
for i=0 to ubound(picidd)
if trim(picidd(i))<>"" then

sql="select * from picmap where id="&trim(picidd(i))
rs.open sql,connphoto,1,3
if rs.eof then
call photoxx("ID所对应的相片信息未找到。")
response.end
end if
if rs("sh")=1 then
rs("sh")=0
else
rs("sh")=1
end if
rs.update
sql="select * from xc where id="&rs("xcid")
set rs1=server.createobject("adodb.recordset")
rs1.open sql,connphoto,1,3
if not rs1.eof then
if isnull(rs1("filename")) or rs1("filename")="" or rs1("filename")=rs("photoslt") then
sql="select * from picmap where xcid="&rs1("id")&" and xs=1 and sh=1"
set rss=connphoto.execute(sql)
if rss.eof then
sql="select * from picmap where xcid="&rs1("id")&" and sh=1"
set rs2=connphoto.execute(sql)
if not rs2.eof then
rs1("filename")=rs2("photoslt")
rs1("photohight")=rs2("photohight")
rs1("photowidth")=rs2("photowidth")
rs1.update
else
rs1("filename")=""
rs1.update
end if
rs2.close '这里出错,execute的记录集不允许使用没有open方法的...^_^..直接set rs2=nothing即可
else
rs1("filename")=rss("photoslt")
rs1("photohight")=rs2("photohight")
rs1("photowidth")=rs2("photowidth")
rs1.update
end if
rss.close
end if
end if
rs1.close
rs.close
end if
next

call photoxx("相片操作成功,请返回刷新。")%>