国标彩钢岩棉板:帮看断代码!

来源:百度文库 编辑:神马品牌网 时间:2024/04/27 19:59:11
<%
set rs = server.createobject("adodb.recordset")
sql = "select * from WWW_QQCF_COM_CfWztg_AD where AdState='2'"
rs.open sql,conn,3,2
if not (rs.eof and rs.bof) then
do while not rs.eof
hang1=int(rs("hang1"))
lie1=int(rs("lie1"))
img=rs("img")
id=rs("id")
ad=rs("ad")
if img="" then img="images/1.gif"
%>

ASP中有这段代码,可是当 字段 AdState属性为数字时就会出现死循环,而属性为文本属性时就可以正常运行,为什么那?而且必须要其属性为数字

我猜的:
为数字的时候,有结果,进入循环,但是由于没有取 rs 的下一个,所以一直没有 eof,所以死循环

加上 rs.movenext 试试