嵌套循环报错!!
<% rst.open "select * from iclass where aclass='企业园地' order by sort asc",conn,1,1
do while not rst.eof
%>
<tr>
<td height="20"><span class="STYLE3"><img src="images/jiao.gif" width="4" height="5" /> <%=rst("bclass")%></span></td>
</tr>
<%
sql = "select * from news where aclass='企业园地' and bclass='"&rst("bclass")&"'order by news_date desc"
rs.open sql,conn,1,1
if rs.eof then
%>
<tr>
<td height="27" ><img src="images/point.gif" width="5" height="5" /> </td>
</tr>
<tr>
<td height="1" background="images/title_line_news.gif"></td>
</tr>
<tr>
<td height="27" ><img src="images/point.gif" width="5" height="5" /> </td>
</tr>
<tr>
<td height="1" background="images/title_line_news.gif"></td>
</tr>
<tr>
<td height="27" ><img src="images/point.gif" width="5" height="5" /> </td>
</tr>
<tr>
<td height="1" background="images/title_line_news.gif"></td>
</tr>
<tr>
<td height="27" ><img src="images/point.gif" width="5" height="5" /> </td>
</tr>
<tr>
<td height="1" background="images/title_line_news.gif"></td>
</tr>
<tr>
<td height="27" ><img src="images/point.gif" width="5" height="5" /> </td>
</tr>
<tr>
<td height="1" background="images/title_line_news.gif"></td>
</tr>
</table>
<%else%>
<table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">
<%i=0
do while not rs.eof%>
<tr>
<td height="27"> <img src="images/point.gif" /> <a href="news_read.asp?warp=yes&action=2&id=<%=rs("news_id")%>&aclass=<%=rs("aclass")%>&bclass=<%=rs("bclass")%>&cclass=<%=rs("cclass")%>" target="_blank" class="a1" >
<% if len(rs("news_title"))>11 then%>
<%=Left(rs("news_title"),10)%>...
<%else%>
<%=rs("news_title")%>
<%end if%></a>
</td>
</tr>
<tr>
<td height="1" background="images/title_line_news.gif"></td>
</tr>
<% rs.movenext i=i+1 if i=3 then exit do loop %>
<%end if%>
<%
rst.movenext
loop
%> <% rs.close rst.close set rst = nothing %>