| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1582 人关注过本帖
标题:急切求助 ADODB.Field 错误 '80020009'
取消只看楼主 加入收藏
jeanlee20xx
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-7-19
收藏
 问题点数:0 回复次数:1 
急切求助 ADODB.Field 错误 '80020009'
下面是代码
 
        <%Dim ipagecount
    Dim ipagecurrent
    Dim strorderBy
    Dim irecordsshown  
    if request.querystring("page")="" then
     ipagecurrent=1
    else
     ipagecurrent=cint(request.querystring("page"))
    end if
     sql="Select * from news where classid=2 order by newsid desc"
    set rs=server.CreateObject("adodb.recordset")
    if request("page")="" then
     rs.pagesize = 8
     rs.cachesize = 8
     MaxPage=16
    else
     rs.pagesize = 12
     rs.cachesize = 12
     MaxPage=12
    end if
    rs.open sql,conn,1,1
    ipagecount = rs.pagecount
    If ipagecurrent > ipagecount Then ipagecurrent = ipagecount
    If ipagecurrent < 1 Then ipagecurrent = 1
    if ipagecount=0 then
     response.write "<tr><td align='center'>没有任何图片</td></tr>"
    else
     rs.absolutepage = ipagecurrent
     irecordsshown = 0
     do while irecordsshown<MaxPage and NOT rs.EOF
      %>
        <tr>
          <%for i=1 to 4%>
          <td width='25%' height="155" align="center">
<table width="75%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="20">&nbsp;</td>
              </tr>
            </table>
            <table width="137" height="210" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center" bgcolor="363737"> <table width="75%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="center" bgcolor="313133">
                        <%if not rs.eof then
      w=100:h=150
      m=w/99:n=h/99
      if w>=99 or h>=99 then
       if m>n then
          w1=99:h1=h/m
       elseif m<n then
          h1=99:w1=w/n
       else
          w1=99:h1=99
       end if
      else
       w1=w:h1=h
      end if%>
                        <a href="view.asp?newsid=<%=rs("newsid")%>" target="_blank"><img src="<%=rs("img")%>" width="100" height="150" border="0" class="link2"></a>
                        <%irecordsshown = irecordsshown +1
  end if
  %>
                      </td>
                    </tr>
                  </table>
                  <table width="75%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td><img src="file%3a///I|/%CD%F8%D5%BE%D4%B4%C2%EB/%B9%A4%D7%F7%CA%D2/flash/web/45.gif
访问网址超出本站范围,不能确定是否安全
继续访问 取消访问file:///I|/%CD%F8%D5%BE%D4%B4%C2%EB/%B9%A4%D7%F7%CA%D2/flash/web/45.gif" width="8" height="10"></td>
                    </tr>
                  </table>
                  <font color="#999999"><%=rs("title")%></font></td>
              </tr>
            </table>
            
            <table width="75%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><img src="file%3a///I|/%CD%F8%D5%BE%D4%B4%C2%EB/%B9%A4%D7%F7%CA%D2/flash/web/45.gif
访问网址超出本站范围,不能确定是否安全
继续访问 取消访问file:///I|/%CD%F8%D5%BE%D4%B4%C2%EB/%B9%A4%D7%F7%CA%D2/flash/web/45.gif" width="8" height="5"></td>
              </tr>
            </table></td>
          <%rs.movenext%>
          <%next%>
        </tr>
        <%loop%>
        <tr>
          <td height='35' colspan='4' align='center' valign="bottom" class="link"><table width="75%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="25">&nbsp;</td>
              </tr>
            </table>
            每页显示 <%=MaxPage%> 组图片 第<font color="#FF0000"><%=ipagecurrent%></font>/<%=ipagecount%>页
            <%if ipagecurrent=1 then
        else
      Response.Write"<a href='?page=1' class='red'>首页</a> | "
      Response.Write"<a href='?page="&ipagecurrent-1&"' class='red'>上一页</a> | "
     end if
     if ipagecount>ipagecurrent then
      Response.Write"<a href='?page="&ipagecurrent+1&"' class='red'>下一页</a> "
      Response.Write"| <a href='?&page="&ipagecount&"' class='red'>末页</a> "
     end if%>
            <table width="75%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="18">&nbsp;</td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="31" background="img/copyright_black.gif">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
        <%end if
   rs.Close
   set rs=nothing
   %>
搜索更多相关主题的帖子: BOF EOF Field ADODB 记录 
2008-07-19 01:18
jeanlee20xx
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-7-19
收藏
得分:0 
多谢,但看了半天,也修改了半天,还是不知道这段代码中哪里有问题,望各位帮帮忙,谢谢!!!
2008-07-19 01:30
快速回复:急切求助 ADODB.Field 错误 '80020009'
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.044640 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved