请问这个ASP语句有错吗?为什么一测试总是死机?

来源:百度知道 编辑:UC知道 时间:2024/05/07 20:17:34
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from sell_info"
rs.open sql,conn,1,1
do while not rs.bof and not rs.eof
response.Write rs("title")
rs.movenext
loop
rs.close
set rs=nothing
%>

do while not rs.bof and not rs.eof
改为
do while not (rs.bof and rs.eof)

注意区分not and or 之类的,他们的优先级,为了自己好理解和好判断,最好用()

do while (not rs.bof) or (not rs.eof)

do while not rs.bof and not rs.eof
头一次见这么写循环的-_-!

do while not (rs.bof and rs.eof) ,楼上的正解

do while not (rs.bof and rs.eof)

哎,没的说了