ASP代码死循环
<%dimrs1,sql1,titlesetrs1=server.CreateObject("adodb.recordset")sql1="selecttop8*from...
<%
dim rs1,sql1,title
set rs1=server.CreateObject("adodb.recordset")
sql1="select top 8 * from news order by newsid desc"
rs1.open sql1,connnews
do while not rs1.eof
%>
<%
if len(rs1("title"))>20 then
title=left(rs1("title"),20)&"..."
else
title=rs1("title")
end if
%>
<tr>
<td> <img src="img/icon.gif" border="0"> <a href="shownews.asp?id=<%=rs1("newsid")%>">
<%if rs1("color")=1 then
Response.Write"<font color=red>"&title&"</font>"
elseif rs1("color")=2 then
Response.Write"<font color=green>"&title&"</font>"
else
Response.Write title
end if
%>
</a> <span style="font-size:9px; font-family:Verdana, Arial, Helvetica, sans-serif "><%=rs1("time")%
></span></td>
</tr>
<%
rs1.movenext
loop
rs1.close
set rs1=nothing
%>
iis6.0读上面的代码超时了,但用ASPStudio又正常,实在不解,希望高手指教! 展开
dim rs1,sql1,title
set rs1=server.CreateObject("adodb.recordset")
sql1="select top 8 * from news order by newsid desc"
rs1.open sql1,connnews
do while not rs1.eof
%>
<%
if len(rs1("title"))>20 then
title=left(rs1("title"),20)&"..."
else
title=rs1("title")
end if
%>
<tr>
<td> <img src="img/icon.gif" border="0"> <a href="shownews.asp?id=<%=rs1("newsid")%>">
<%if rs1("color")=1 then
Response.Write"<font color=red>"&title&"</font>"
elseif rs1("color")=2 then
Response.Write"<font color=green>"&title&"</font>"
else
Response.Write title
end if
%>
</a> <span style="font-size:9px; font-family:Verdana, Arial, Helvetica, sans-serif "><%=rs1("time")%
></span></td>
</tr>
<%
rs1.movenext
loop
rs1.close
set rs1=nothing
%>
iis6.0读上面的代码超时了,但用ASPStudio又正常,实在不解,希望高手指教! 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询