| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1018 人关注过本帖
标题:[求助]Active Server Pages, ASP 0113 (0x80004005)超过了脚本运行的最长时 ...
只看楼主 加入收藏
枫血
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-6-28
收藏
 问题点数:0 回复次数:2 
[求助]Active Server Pages, ASP 0113 (0x80004005)超过了脚本运行的最长时间。

这是一段修改信息的页面, 只有大类的时候 可以调出数据, 有了小类,就会超过了脚本运行的最长时间!!
<%
dim id
id=request.QueryString("id")
if not isnumeric(id) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
end if
%>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from SmallClass_New order by SmallClassID asc",conn,1,1


%>
<script language = "JavaScript">
var onecount;

subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= rs("BigClassName")%>","<%= rs("SmallClassName")%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>

onecount=<%=count%>;

function changelocation(locationid)
{
document.myform.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}
//-->
</script>

<form name="myform" method="post" action="addnew.asp?action=edit&id=<%=id%>">
<td>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF">
<tr >
<td width="21%" align="right">选择分类:</td>
<td width="79%">大类:
<%dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from News where id="&id,conn,1,1

rs.open "select * from BigClass_New order by BigClassID asc",conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)">
<%
do while not rs.eof
%>
<option value="<%=rs("BigClassName")%>" <%if rs1("BigClassName")=rs("BigClassName") then%>selected<%end if%>><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
小类:
<select name="SmallClassName">

<%
rs.open "select * from SmallClass_New where BigClassName="&rs1("BigClassName"),conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof%>
<option value="<%=rs("SmallClassName")%>"<%if rs1("SmallClassName")=rs("SmallClassName") then %> selected <%end if %> ><%=trim(rs("SmallClassName"))%></option>
<% rs.movenext
loop


end if
rs.close
set rs= nothing
%>
</select>

[此贴子已经被作者于2007-6-29 10:29:22编辑过]

搜索更多相关主题的帖子: Active Pages 脚本 Server ASP 
2007-06-29 10:22
阳光白雪
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:39
帖 子:2220
专家分:0
注 册:2005-11-18
收藏
得分:0 

[QUOTE]这是一段修改信息的页面, 只有大类的时候 可以调出数据, 有了小类,就会超过了脚本运行的最长时间!!
<script language = "JavaScript">
<!--
var onecount;
subcat = new Array();
<%
dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from SmallClass_New order by SmallClassID asc",conn,1,1
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= rs("BigClassName")%>","<%= rs("SmallClassName")%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid){
document.myform.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++){
if (subcat[i][1] == locationid){
document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
//-->
</script>
<form name="myform" method="post" action="addnew.asp?action=edit&id=<%=id%>">
<td>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF">
<tr >
<td width="21%" align="right">选择分类:</td>
<td width="79%">大类:
<%
dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select BigClassName,SmallClassName from News where id="&id,conn,1,1
BigClassName = rs1("BigClassName")
SmallClassName = rs1("SmallClassName")
rs1.Close
Set rs1. = Nothing
rs.open "select * from BigClass_New order by BigClassID asc",conn,1,1
if rs.eof then
response.write "请先添加栏目。"
response.end
else
%>
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)">
<%
do while not rs.eof
%>
<option value="<%=rs("BigClassName")%>" <%if BigClassName=rs("BigClassName") then%>selected<%end if%>><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
小类:
<select name="SmallClassName">
<%
rs.open "select * from SmallClass_New where BigClassName="& BigClassName,conn,1,1
if not rs.eof then
do while not rs.eof
%>
<option value="<%=rs("SmallClassName")%>" <%if SmallClassName=rs("SmallClassName") then %>selected<%end if %>><%=trim(rs("SmallClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
set rs= nothing
%>
</select> [/QUOTE]


专注于WEB前端交互平台开发:[url=http://blog./]blog.[/url](富客户端技术(RIA)交流平台)
2007-06-29 10:46
枫血
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-6-28
收藏
得分:0 
回复:(阳光白雪)
不好意思啊!! 我按你的改了一下, 还是不行 ,还是超时间!!!!!
2007-06-29 11:09
快速回复:[求助]Active Server Pages, ASP 0113 (0x80004005)超过了脚本运行的最 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012077 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved