帮我看看这段代码,怎么是死循环啊?

来源:百度知道 编辑:UC知道 时间:2024/05/13 17:03:11
<%
dim StrTitle,StrKeyword,IntClassid,IntOrder
StrKeyword=FunSql(Request.QueryString("K"),False)
IntClassid=FunSql(Request.QueryString("C"),true)
IntOrder=FunSql(Request.querystring("Order"),true)
strSql="select N_title,id,N_ClickCount,N_CreateFile,N_time,N_url from R_news where N_Del=0 and N_CreateFile=1"
if IntClassid<>0 then
strSql=strSql&"and N_Class="&IntClassid&" "
end if
if StrKeyword<>"" then
strSql=strSql&"and (N_Title like '%"&StrKeyword&"%' or N_EditAuthor like '"&StrKeyword&"' or N_keyword like '%"&StrKeyword&"%' or N_Author like '"&StrKeyword&"') "
end if
'select case IntOrder
'case 1
strSQL=strSql&"order by id desc"
'case 2
'strSQL=strSql&"order by N_ClickCount desc"

你的程序是不是不完整啊,do while的结束语句怎么没看到
楼上的也真搞笑,他就是想RS没结束的时候执行循环,如果去掉NOT肯定错了
我想你的问题可能是lngTotal<>rs.pagesize 永真,而且rs没有movenext所以死循环

do while not rs.eof and lngTotal<>rs.pagesize
把not去掉啊 晕