ASP报错 ADODB.Recordset '800a0e78' 对象关闭时,不允许操作。
带#号的那行出错<%ifsession("admin")=""thenresponse.Write"<scriptlanguage='javascript'>alert(...
带#号的那行出错
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>2 then
response.Write "<p align=center><font color=red>您没有此项目管理权限!</font></p>"
response.End
end if
end if
selectbookid=trim(request("selectdel"))
set u=conn.execute("select * from admin_user where admin ='"&session("admin")&"'")
if selectbookid<>"" then
conn.execute "delete from money_list where id in ("&selectbookid&")"
response.Redirect("get_money.asp")
response.End
end if
action=trim(request("site"))
if action = "未处理" then
conn.execute("update money_list set site = '未处理' where id="&trim(request("id")))
elseif action = "已经处理" then
set rs1=conn.execute("select * from money_list where id ="&trim(request("id")))
if rs1("site") <> "已经处理" then
conn.execute("update money_list set site = '已经处理' where id="&trim(request("id")))
conn.execute("update money_list set set_time = now() where id="&trim(request("id")))
set rs=server.CreateObject("adodb.recordset")
sql="select * from money_list where id ="&trim(request("id"))
rs.open sql,conn,2,3
rs("chuliren")=u("admin")
rs.update
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manage.css" type="text/css">
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<BODY background="../images/admin/back.gif">
<%
dim namekey,checkbox,action,money_id,user_name,add_time1,add_time2,site
action=request.QueryString("action")
checkbox=request("checkbox")
namekey=request("namekey")
money_id=request("money_id")
user_name=request("user_name")
add_time1=request("add_time1")
add_time2=request("add_time2")
site=request("site")
if InStr(namekey,"'")>0 then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
end if
if namekey="" then namekey=request("namekey")
if checkbox="" then checkbox=request("checkbox")
id =trim(request("id"))
if id ="" then
id=0
end if
set rs=server.CreateObject("adodb.recordset")
if money_id = "" and user_name = "" and add_time1 = "" and add_time2 = "" and site = "" then
rs.open "select * from money_list where money_type = 2",conn,3,1
end if
if rs.eof And rs.bof then ####################
Response.Write "<br><br><br><br><br><br><br><br><br><br><br><br><p align='center' class='contents'> "&namekey&" 无此信息,请点击<a href='get_money.asp'>返回</a>重新搜索!</p><br><br><br><br><br><br><br><br><br><br><br><br>"
end if
%>
问题如果解决了,还可追加 展开
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>2 then
response.Write "<p align=center><font color=red>您没有此项目管理权限!</font></p>"
response.End
end if
end if
selectbookid=trim(request("selectdel"))
set u=conn.execute("select * from admin_user where admin ='"&session("admin")&"'")
if selectbookid<>"" then
conn.execute "delete from money_list where id in ("&selectbookid&")"
response.Redirect("get_money.asp")
response.End
end if
action=trim(request("site"))
if action = "未处理" then
conn.execute("update money_list set site = '未处理' where id="&trim(request("id")))
elseif action = "已经处理" then
set rs1=conn.execute("select * from money_list where id ="&trim(request("id")))
if rs1("site") <> "已经处理" then
conn.execute("update money_list set site = '已经处理' where id="&trim(request("id")))
conn.execute("update money_list set set_time = now() where id="&trim(request("id")))
set rs=server.CreateObject("adodb.recordset")
sql="select * from money_list where id ="&trim(request("id"))
rs.open sql,conn,2,3
rs("chuliren")=u("admin")
rs.update
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manage.css" type="text/css">
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<BODY background="../images/admin/back.gif">
<%
dim namekey,checkbox,action,money_id,user_name,add_time1,add_time2,site
action=request.QueryString("action")
checkbox=request("checkbox")
namekey=request("namekey")
money_id=request("money_id")
user_name=request("user_name")
add_time1=request("add_time1")
add_time2=request("add_time2")
site=request("site")
if InStr(namekey,"'")>0 then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
end if
if namekey="" then namekey=request("namekey")
if checkbox="" then checkbox=request("checkbox")
id =trim(request("id"))
if id ="" then
id=0
end if
set rs=server.CreateObject("adodb.recordset")
if money_id = "" and user_name = "" and add_time1 = "" and add_time2 = "" and site = "" then
rs.open "select * from money_list where money_type = 2",conn,3,1
end if
if rs.eof And rs.bof then ####################
Response.Write "<br><br><br><br><br><br><br><br><br><br><br><br><p align='center' class='contents'> "&namekey&" 无此信息,请点击<a href='get_money.asp'>返回</a>重新搜索!</p><br><br><br><br><br><br><br><br><br><br><br><br>"
end if
%>
问题如果解决了,还可追加 展开
展开全部
if money_id = "" and user_name = "" and add_time1 = "" and add_time2 = "" and site = "" then
rs.open "select * from money_list where money_type = 2",conn,3,1
end if
出错可能是没有满足条件吧 rs.open没有执行,当然就报错了
rs.open "select * from money_list where money_type = 2",conn,3,1
end if
出错可能是没有满足条件吧 rs.open没有执行,当然就报错了
追问
但是这个页面第一次打开的时候是可以打开的啊,我也做过测试的
只是进行搜索操作的时候才会出现报错
追答
第一次打开当然没问题,所有参数都是空,也就是满足了if的条件,执行了rs.open "select * from money_list where money_type = 2",conn,3,1,当提交搜索时,money_id = "" and user_name = "" and add_time1 = "" and add_time2 = "" and site = ""这些有的不为空了,所以就报错了
威孚半导体技术
2024-08-19 广告
2024-08-19 广告
威孚(苏州)半导体技术有限公司是一家专注生产、研发、销售晶圆传输设备整机模块(EFEM/SORTER)及核心零部件的高科技半导体公司。公司核心团队均拥有多年半导体行业从业经验,其中技术团队成员博士、硕士学历占比80%以上,依托丰富的软件底层...
点击进入详情页
本回答由威孚半导体技术提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询