asp和access代码问题

来源:百度知道 编辑:UC知道 时间:2024/05/25 01:43:03
<% sql="select top 10 id,pname from na_column where pid="&cateidt(i)
set rs2=conn.execute(sql)
if not rs2.eof then
do while not rs2.eof%><li class="f3">  <a href='news.asp?cateid=<%=rs2("id")%>' class="f3" target='_blank'><%=rs2("pname")%></a></li><% rs2.movenext
loop
else
response.write "<li>暂无相关信息... </li>"
end if
rs2.close%>
</DIV>
<DIV class="con_detail_right">
<P><A href="works_list.asp?cateid=<%=rs("id")%>"><img src="<%=rs("pimage")%>" width="441" onmousemove='if(this.height<441)this.width=441 ' onload='if(this.width>441)this.width=441' style="FILTER :alpha(opacity=91);" onMouseOver="nereidFade(this,100,10,5); " onMouseOut="nereidFade(thi

链接这个<a href="work_info.asp?id=<%=rs("id")%>">时记录集已经关闭 所以出错
试试这个:
<% sql="select top 10 id,pname from na_column where pid="&cateidt(i)
set rs2=conn.execute(sql)
if not rs2.eof then
do while not rs2.eof%><li class="f3"> <a href='news.asp?cateid=<%=rs2("id")%>' class="f3" target='_blank'><%=rs2("pname")%></a></li><% rs2.movenext
loop
else
response.write "<li>暂无相关信息... </li>"
end if
%>
</DIV>
<DIV class="con_detail_right">
<P><A href="works_list.asp?cateid=<%=rs("id")%>"><img src="<%=rs("pimage")%>" width="441" onmousemove='if(this.height<441)this.width=441 ' onload='if(this.width>441)this.width=441' style="FILTER :alpha(opacity=91)