我写的asp程序,我用 asp studio2005调试,没有人任何问题,而用iis调试时,出现错误提示
 
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242 
 ADODB.Field
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/grkq.asp,行0
程序中哪有零行呀,朝郁闷
代码如下:
               <%    set kqrs = server.CreateObject("adodb.recordset")
       
              kqsql="select * from kqxxv where ygid='"&ygid&"' and signtime>='"&kqt1&"' and signtime<='"&kqt2&"'"  
              kqrs.Open kqsql,conn,1,1 
                        %>
     
   <% '分页显示
dim i,intPage,page,pre,last,filepath  
      kqrs.PageSize = 17         
      pre = true
      last = true      
      if len(page) = 0 then
                  intpage = 1
                  pre = false
      else
          if cint(page) =< 1 then
               intpage = 1
               pre = false
          else
              if cint(page) >= kqrs.PageCount then
                  intpage = kqrs.PageCount
                  last = false
              else
                   intpage = cint(page)
             end if
         end if
      end if  
    kqrs.AbsolutePage = intpage
  
%>
。。。。。。
共<%=kqrs.recordcount%>条</td>
        <td width="71%" align="right"> <a href="grkq.asp?page=1&kqt1=<%=kqt1%>&kqt2=<%=kqt2%>&yggid=<%=ygid%>">首</a>|
            <%if pre then%>
            <a href="grkq.asp?page=<%=intpage -1%>&kqt1=<%=kqt1%>&kqt2=<%=kqt2%>&yggid=<%=ygid%>">上</a>|
            <%end if%>
            <%if last then%>
            <a href="grkq.asp?page=<%=intpage +1%>&kqt1=<%=kqt1%>&kqt2=<%=kqt2%>&yggid=<%=ygid%>">下</a> |
            <%end if%>
            <a href="grkq.asp?page=<%=kqrs.PageCount%>&kqt1=<%=kqt1%>&kqt2=<%=kqt2%>&yggid=<%=ygid%>">尾</a>
。。。。。。
经分析是加黑的地方出错,于是我把它改为
if not kqrs.eof then
kqrs.AbsolutePage = intpage
end if
可是还是不行,难道数据库为空时就不能分页吗?查询结果为空,显示部分为空就行,我其他的程序也是这样做的,就没有问题
[此贴子已经被作者于2005-12-24 9:41:01编辑过]