瑞星卡卡安全论坛技术交流区系统软件 求助ASP编程分页问题(向高手求救)

1   1  /  1  页   跳转

求助ASP编程分页问题(向高手求救)

求助ASP编程分页问题(向高手求救)

本人在写ASP分页时不知为何出错题示为
ADODB.Recordset 错误 '800a0bb9'
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

/products.asp,行 141

代码如下
打星号的是出错行请高手指证
<!--#include virtual="/inc/conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>+ +</title>
<link href="css/weinencss.css" rel="stylesheet" type="text/css">
</head>

<body>
<%

set rs_cplx=server.createObject("adodb.recordset")
sqlstr="select * from cplx"
rs_cplx.open sqlstr,conn,1,3


set rs_cpys=server.createObject("adodb.recordset")
sqlstr="select * from cpys"
rs_cpys.open sqlstr,conn,1,3
%>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="262" rowspan="2"><img src="images/photo01.gif" width="427" height="262"></td>
    <td height="49" valign="bottom">      <table width="502" height="20"  border="0" cellpadding="0" cellspacing="0">
      <tr align="center" class="topfont">
        <td width="70" ><a class='top' href="index.htm">首页</a></td>
        <td width="70"><a class='top' href="index.htm">公司简介</a></td>
        <td width="70"><a class='top' href="newproducts.htm">推荐产品</a></td>
        <td width="70"><a class='top' href="products.htm">产品展示</a></td>
        <td width="70"><a class='top' href="job.htm">人才招聘</a></td>
        <td width="70"><a class='top' href="Customer.htm">客户反馈</a></td>
        <td width="82"><a class='top' href="Contact.htm">客户中心 </a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="213"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="573" height="213">
      <param name="movie" value="swf/top.swf">
      <param name="quality" value="high">
      <embed src="swf/top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="573" height="213"></embed>
    </object></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="200" valign="top"><table width="200" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/photo11.gif" width="200" height="48"></td>
      </tr>
      <tr>
        <td background="images/photo27.gif">
        <%while not rs_cplx.eof%>
        <table width="189" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="28" height="25" align="right" class="fonttop"><img src="images/top.gif" width="16" height="16"></td>
              <td width="172" class="fonttop"><a href="products.asp?bs=<%=rs_cplx("bs")%>"><%=rs_cplx("lxmc")%></a></td>
            </tr>
            <tr>
              <td colspan="2"><img src="images/photo26.gif" width="200" height="5"></td>
            </tr>
          </table>
                  <%rs_cplx.movenext
     wend
     rs_cplx.movefirst%>
          </td>
      </tr>
      <tr>
        <td background="images/photo27.gif"><img src="images/photo12.gif" width="200" height="16"></td>
      </tr>
    </table>
    <table width="200" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><table width="189" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td><img src="images/photo18.gif" width="189" height="41"></td>
              </tr>
              <tr>
                <td background="images/photo19.gif">
                  <table width="189" border="0" cellspacing="0" cellpadding="0">
                    <form name="form1" method="post" action="">
                      <tr>
                        <td width="58" height="25" align="right">名称:</td>
                        <td width="131"><input name="textfield" type="text" class="iput1" size="15"></td>
                      </tr>
                      <tr>
                        <td height="25" align="right">成分:</td>
                        <td><input name="textfield2" type="text" class="iput1" size="15"></td>
                      </tr>
                      <tr>
                        <td height="25" align="right">重量:</td>
                        <td><input name="textfield3" type="text" class="iput1" size="15"></td>
                      </tr>
                      <tr>
                        <td height="25" align="right">型号:</td>
                        <td><input name="textfield4" type="text" class="iput1" size="15"></td>
                      </tr>
                      <tr align="center" valign="bottom">
                        <td height="25" colspan="2"><input name="imageField" type="image" src="images/Bottom03.gif" width="64" height="18" border="0"></td>
                      </tr>
                    </form>
                </table></td>
              </tr>
              <tr>
                <td><img src="images/photo20.gif" width="189" height="11"></td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td height="10"> </td>
        </tr>
        <tr>
          <td><img src="images/Contact.gif" width="189" height="181"></td>
        </tr>
      </table></td>
    <td width="1" background="images/photo02.gif"><img src="images/photo02.gif" width="1" height="1"></td>
    <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="1%"> </td>
        <td width="99%" height="25"><img src="images/photo05.gif" width="9" height="9"> 首页 > 公司简介</td>
      </tr>
      <tr>
        <td> </td>
        <td><img src="images/Navigate03.gif" width="298" height="39"></td>
      </tr>
      <tr>
        <td height="8" colspan="2"><div align="center"><img src="images/line.gif" width="762" height="2"></div></td>
      </tr>
    </table>
     <%if request("bs")="" and session("bs")="" then
     response.write("请从左边产品导航选择你想要查看的产品类型名称")
     else%> 
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="8" colspan="4"></td>
        </tr>
        <%
       
       
        set rs_cpxx=server.createObject("adodb.recordset")
******sqlstr="select * from cpxx where bs1="&request("bs")
*****rs_cpxx.Open sql,conn,1,3

          rs_cpxx.PageSize = 20 
      rs_cpxx.CursorLocation = 3
      pre = true
      last = true
      page = trim(Request.QueryString("page"))
     
      if len(page) = 0 then
                  intpage = 1
                  pre = false
      else
          if cint(page) =< 1 then
              intpage = 1
              pre = false
          else
              if cint(page) >= rs_cpxx.PageCount then
                  intpage = rs_cpxx.PageCount
                  last = false
              else
                  intpage = cint(page)
            end if
        end if
      end if
    if not rs_cpxx.eof then
        rs_cpxx.AbsolutePage = intpage
    end if
   
   
   
   
   
   
    for i=1 to rs_cpxx.pagesize
    if rs_cpxx.eof or rs_cpxx.bof then exit for
    %>
        <tr>
        <%if request("bs")=rs_cpxx("bs1") then
        session("bs")=0%>
          <td width="25%"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div align="center"><a href="productsShow.asp?bs2=<%=rs_cpxx("bs2")%>&picture2=<%=rs_cpxx("picture2")%>"><img src="<%=rs_cpxx("picture1")%>" border="0"></a></div></td>
  </tr>
  <tr>
    <td><div align="center">编号名称:<%=rs_cpxx("mc")%></div></td>
  </tr>
</table></td>
         <%i=i+1
         rs_cpxx.movenext
         end if%>
        
        
         <%if rs_cpxx.eof or rs_cpxx.bof then exit for
         if request("bs")=rs_cpxx("bs1") then%>
          <td width="25%"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div align="center"><a href="productsShow.asp?bs2=<%=rs_cpxx("bs2")%>&picture2=<%=rs_cpxx("picture2")%>"><img src="<%=rs_cpxx("picture1")%>" border="0"></a></div></td>
  </tr>
  <tr>
    <td><div align="center">编号名称:<%=rs_cpxx("mc")%></div></td>
  </tr>
</table></td>
         <%i=i+1
         rs_cpxx.movenext
         end if%>
        
         <%if rs_cpxx.eof or rs_cpxx.bof then exit for
         if request("bs")=rs_cpxx("bs1") then%>
          <td width="25%"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div align="center"><a href="productsShow.asp?bs2=<%=rs_cpxx("bs2")%>&picture2=<%=rs_cpxx("picture2")%>"><img src="<%=rs_cpxx("picture1")%>" border="0"></a></div></td>
  </tr>
  <tr>
    <td><div align="center">编号名称:<%=rs_cpxx("mc")%></div></td>
  </tr>
</table></td>
         <%i=i+1
         rs_cpxx.movenext
         end if%>
        
         <%if rs_cpxx.eof or rs_cpxx.bof then exit for
         if request("bs")=rs_cpxx("bs1") then%>
          <td width="25%"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div align="center"><a href="productsShow.asp?bs2=<%=rs_cpxx("bs2")%>&picture2=<%=rs_cpxx("picture2")%>"><img src="<%=rs_cpxx("picture1")%>" border="0"></a></div></td>
  </tr>
  <tr>
    <td><div align="center">编号名称:<%=rs_cpxx("mc")%></div></td>
  </tr>
</table></td>
         <%i=i+1
         rs_cpxx.movenext
         end if%>
        </tr>
        <%next%>
       
        <tr>
       
          <td colspan="4"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
  <%if rs_cpxx.pagecount > 0 then%>
    <td>当前页<%=intpage%>/<%=rs_cpxx.PageCount%></td>
    <%end if%>
    <td><a href="products.asp?page=1&bs=<%=request("bs")%>">首页</a></td>
    <%if pre=true then%>
    <td><a href="products.asp?page=<%=intpage -1%>&bs=<%=request("bs")%>">上一页</a></td><%end if%>
    <%if last=true then%>
    <td><a href="products.asp?page=<%=intpage +1%>&bs=<%=request("bs")%>">下一页</a></td><%end if%>
    <td><a href="products.asp?page=<%=rs_cpxx.pagecount%>&bs=<%=request("bs")%>">末页</a></td>
    <td> </td>
  </tr>
</table>
</td>
        </tr>
      </table>
<%end if%>    

      
    </td>
  </tr>
</table>
<table width="100%" height="108"  border="0" cellpadding="0" cellspacing="0" background="images/Bottomback.gif">
  <tr>
    <td align="center" valign="middle"></td>
  </tr>
</table>
<%rs_cplx.close
  rs_cpxx.close
  rs_cpys.close
  set rs_cplx=nothing
  set rs_cpxx=nothing
  set rs_cpys=nothing%>
</body>
</html>
最后编辑2006-01-25 17:43:08
分享到:
gototop
 

哦哦 对啊!现在一看才知道,谢谢!
gototop
 
1   1  /  1  页   跳转
页面顶部
Powered by Discuz!NT