当前位置: 代码迷 >> VB Dotnet >> 老项目vb写的asp代码,陷入死循环,求大家帮看看
  详细解决方案

老项目vb写的asp代码,陷入死循环,求大家帮看看

热度:141   发布时间:2016-04-25 02:15:33.0
求助老项目vb写的asp代码,陷入死循环,求大家帮看看啊
sqlSmallClass="select * from SmallClass_new where BigClassID=3 order by smallclassid asc"
            Set rsSmallClass= Server.CreateObject("ADODB.Recordset")
            rsSmallClass.open sqlSmallClass,conn,1,1
if not rsSmallClass.eof then%>
            <%do while not rsSmallClass.eof%>
            <li><a href="news.asp?biguid=3&smauid=<%=rsSmallClass("smallclassid")%>"><%=rsSmallClass("smallclassname")%></a></li>
             <%rsSmallClass.movenext
    loop
        rsSmallClass.close
    set rsSmallClass=nothing
end if



------解决方案--------------------
do while not rsSmallClass.eof 
在这句语句前面追加个rsSmallClass.MoveFirst试试?
或者看看rsSmallClass.RecordCount是不是0
  相关解决方案