do while语句出错
大家好,我的index.asp在IE上运行时出现了死循环,系统提示连接超时,以下是源代码,请高手赐教!<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>永州职业技术学院成教部欢迎您!</title>
<link href="cjb.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="990" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<!--#include file="top.asp"--></td></tr>
<tr>
<td><table width="990" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="1" valign="top" bgcolor="#004292"></td>
<td rowspan="4" width="15"> </td>
<td><table width="990" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="318" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="182" height="4"> </td>
</tr>
<tr>
<td width="182" height="28"><img src="images/gbl2.gif" width="318" height="42" /></td>
</tr>
<tr>
<td><table width="318" border="0" cellspacing="0" cellpadding="0" bgcolor="#F2F2F2">
<%
set oRs=server.createobject("adodb.recordset")
sSql="select top 8 * from news where cataid='公布栏' order by id desc "
oRs.open sSql,oConn,1,1%>
<%dim e
do while not oRs.eof and e<10
if len(oRs("title"))>18 then
title=left(oRs("title"),18)+"…"
else
title=oRs("title")
end if
if len(title)<15 then
addtime=oRs("addtime")
else
addtime=""
end if
%>
<tr>
<td width="25" height="21" align="center" valign="middle"><img src="images/wjj.gif" width="14" height="9" /></td>
<td height="21"><a href="xyxw_view.asp?id=<%=oRs("id")%>"class="ttblue" title=<%=oRs("title")%>><%=title%></a><%=addtime%></td>
</tr>
<%e=e+1
oRs.movenext
loop
oRs.close
if e=1 then%>
<tr>
<td width="18" height="22" align="center" valign="middle"><img src="images/wjj.gif" width="9" height="9"></td>
<td height="22" valign="bottom">还 没 有 任 何 记 录</td>
</tr>
<%end if%>
</table></td>
</tr>
</table></td>
<td><table width="297" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="4"> </td>
</tr>
<tr>
<td width="297"><img src="images/zsxx2.gif" width="297" height="42" /></td>
</tr>
<tr>
<td><table width="" border="0" cellspacing="0" cellpadding="0" bgcolor="#F2F2F2">
<tr>
<td><table width="297" border="0" cellspacing="0" cellpadding="0">
<%
set oRs=server.createobject("adodb.recordset")
sSql="select top 8 * from news where cataid='招生信息' order by id desc "
oRs.open sSql,oConn,1,1%>
<%dim f
do while not oRs.eof and f<10
if len(oRs("title"))>18 then
title=left(oRs("title"),18)+"…"
else
title=oRs("title")
end if
if len(title)<15 then
addtime=oRs("addtime")
else
addtime=""
end if
%>
<tr>
<td width="25" height="21" align="center" valign="middle"><img src="images/wjj.gif" width="14" height="9" /></td>
<td height="21"><a href="xyxw_view.asp?id=<%=oRs("id")%>"class="ttblue" title=<%=oRs("title")%>><%=title%></a><%=addtime%></td>
</tr>
<%f=f+1
oRs.movenext
loop
oRs.close
if f=1 then%>
<tr>
<td width="18" height="22" align="center" valign="middle"><img src="images/wjj.gif" width="9" height="9"></td>
<td height="22" valign="bottom">还 没 有 任 何 记 录</td>
</tr>
<%end if%>
</table></td>
</tr>
</table></td>
<td><table width="198" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="4"> </td>
</tr>
<tr>
<td><img src="images/cjcx1.gif" width="198" height="63" /></td>
</tr>
<tr>
<td><table width="198" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="4"> </td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="42" height="20"><img src="images/xh.gif" width="35" height="15"></td>
<td width="156"><INPUT name=xsxh class="tt" id=xsxh
size=16 maxLength=16></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="42" height="20"><img src="images/xm.gif" width="35" height="15"></td>
<td width="156"><INPUT name=xsxm class="tt" id=xsxm4 size=16></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/tj.gif" width="26" height="12" align="right"></td>
<td width="4"> </td>
<td><img src="images/cz.gif" width="26" height="12"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="990" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="387"><table width="318" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="4"> </td>
</tr>
<tr>
<td><img src="images/zkkx2.gif" width="318" height="47" /></td>
</tr>
<tr>
<td><table width="" border="0" cellspacing="0" cellpadding="0" bgcolor="#F2F2F2">
<tr>
<td><table width="318" border="0" cellspacing="0" cellpadding="0">
<%
set oRs=server.createobject("adodb.recordset")
sSql="select top 8 * from news where cataid='自考快讯' order by id desc "
oRs.open sSql,oConn,1,1%>
<%dim s
do while not oRs.eof and s<10
if len(oRs("title"))>18 then
title=left(oRs("title"),18)+"…"
else
title=oRs("title")
end if
if len(title)<15 then
addtime=oRs("addtime")
else
addtime=""
end if
%>
<tr>
<td width="25" height="21" align="center" valign="middle"><img src="images/wjj.gif" width="14" height="9" /></td>
<td height="21"><a href="xyxw_view.asp?id=<%=oRs("id")%>"class="ttblue" title=<%=oRs("title")%>><%=title%></a><%=addtime%></td>
</tr>
<%s=s+1
oRs.movenext
loop
oRs.close
if s=1 then%>
<tr>
<td width="18" height="22" align="center" valign="middle"><img src="images/wjj.gif" width="9" height="9"></td>
<td height="22" valign="bottom">还 没 有 任 何 记 录</td>
</tr>
<%end if%>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="361"><table width="297" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td><img src="images/cjkx2.gif" width="297" height="47" /></td>
</tr>
<tr>
<td><table width="182" border="0" cellspacing="0" cellpadding="0" bgcolor="#F2F2F2">
<tr>
<td><table width="297" border="0" cellspacing="0" cellpadding="0">
<%
set oRs=server.createobject("adodb.recordset")
sSql="select top 8 * from news where cataid='成教快讯' order by id desc "
oRs.open sSql,oConn,1,1%>
<%dim i
do while not oRs.eof and i<10
if len(oRs("title"))>18 then
title=left(oRs("title"),18)+"…"
else
title=oRs("title")
end if
if len(title)<15 then
addtime=oRs("addtime")
else
addtime=""
end if
%>
<tr>
<td width="25" height="21" align="center" valign="middle"><img src="images/wjj.gif" width="14" height="9" align="center"/></td>
<td height="21"><a href="xyxw_view.asp?id=<%=oRs("id")%>"class="ttblue" title=<%=oRs("title")%>><%=title%></a><%=addtime%></td>
</tr>
<%i=i+1
oRs.movenext
loop
oRs.close
if i=1 then%>
<tr>
<td width="18" height="22" align="center" valign="middle"><img src="images/wjj.gif" width="9" height="9"></td>
<td height="22" valign="bottom">还 没 有 任 何 记 录</td>
</tr>
<%end if%>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="242"><table width="198" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/lqcx1.gif" width="197" height="69"></td>
</tr>
<tr>
<td><a href="#"><img src="images/11.gif" width="198" height="98" border="0"></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
<td width="1" valign="top" bgcolor="#004292"></td>
</tr>
</tr>
</table>
</table>
<!--#include file="bottom.asp"-->
</body>
</html>