这段ASP代码那儿出错了,请教高手解决

来源:百度知道 编辑:UC知道 时间:2024/05/18 04:54:03
麻烦各位高手看看下面的代码哪出错了,为什么老是提示“缺少‘rs’”?

<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from news order by id desc"
rs.open sql,db,1,1
do while not rs.eof
%>
<style type="text/css">
<!--
.STYLE1 {font-size: 12px}
.STYLE3 {font-size: 12px; color: #FF0000; }
-->
</style>
<table width="408" border="0" align="center" cellspacing="0" whith="100%" cellspadding="0">
<%do while not rs.eof%><tr>
<td width="184"><span class="STYLE3"><a href="disply.asp?id=<%=rs("id")%>"><%=rs("title")%></a></span></td>
<td width="58"><span class="STYLE1"><%=rs("zuozhe")%></span></t

哦 知道了
把第一次出现的do while not rs.eof 和最后一次出现的loop删掉就好了,多余的,你已经释放了rs,并关闭了数据库连接,怎么还怎么循环,

do while not rs.eof
看不明白,你用两层循环干什么??