CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  ASP

类型不匹配

楼主shwns()2006-10-02 15:05:16 在 Web 开发 / ASP 提问

<%@LANGUAGE="VBSCRIPT"   CODEPAGE="936"%>  
  <!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  <html   xmlns="http://www.w3.org/1999/xhtml">  
  <head>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312"   />  
  <title>分页显示记录</title>  
  </head>  
  <body>  
  <%  
      dim   cnn,rst,sSQL,currentPage,rowCount,i  
      currentPage=request.QueryString("currentPage")  
      if   currentPage=""   then  
      currentPage=1  
      end   if  
      set   conn=server.CreateObject("adodb.connection")  
      set   rst=server.CreateObject("adodb.recordset")  
      conn.open"dbq="&server.MapPath("mydatabase.mdb")&";driver={Microsoft   Access   Driver   (*.mdb)}"  
      rst.cursortype=3    
      rst.pagesize=5  
      sSQL="select   *   from   Products"  
      rst.open   sSQL,conn  
      rst.absolutepage=currentPage  
      rowCout=0  
  %>  
  <table   border="1">  
  <caption>作者情况一览表</caption>  
  <tr>  
  <%   for   i=0   to   rst.fields.count-1   %>  
  <th><%   =rst(i).name   %></th>  
  <%   next   %>  
  </tr>  
  <%   while   not   rst.eof   and   rowCout<rst.pagesize   %>  
  <tr>  
  <%   for   i=0   to   rst.fields.count-1   %>  
  <td><%   =rst(i)   %></td>  
  <%   next   %>  
  </tr>  
  <%  
      rowCount=rowCount+1  
      rst.movenext  
      wend  
  %>  
  </table>  
  <p>共<%   =rst.pagecount   %>页&nbsp;当前页次:<%   =currentPage   %>/<%   =rst.pagecount   %>&nbsp;&nbsp;&nbsp;分布:  
  <%  
      for   i=1   to   rst.pagecount  
      if   i=cint(currentPage)   then  
  %>  
  [<font   color="red"><%   =i   %></font>]&nbsp;&nbsp;  
  <%   else   %>  
  [<a   href=fy.asp?currentPage=<%   =i   %>"><%   =i   %></a>]&nbsp;&nbsp;  
  <%    
        end   if    
        next    
  %>  
  </p>  
  </body>  
  </html>  
  运行首页(第一页)没错,但点其它页出现以下错误:  
  技术信息(用于支持人员)  
   
  错误类型:  
  Provider   (0x80020005)  
  类型不匹配。  
  /test/fy.asp,   第   22   行  
   
   
  浏览器类型:  
  Mozilla/4.0   (compatible;   MSIE   6.0;   Windows   NT   5.1;   SV1)    
   
  网页:  
  GET   /test/fy.asp    
   
  时间:  
  2006年10月2日,   下午   02:46:41    
   
   
  详细信息:  
  Microsoft   支持    
  请大侠们帮帮忙。 问题点数:10、回复次数:3Top

1 楼hanpoyangtitan(韩波洋)回复于 2006-10-02 17:20:41 得分 0

products是不是写错了?Top

2 楼cceon(披着狼皮的黄鼠狼)回复于 2006-10-02 19:01:48 得分 0

currentPage=cint(request.QueryString("currentPage"))Top

3 楼shwns()回复于 2006-10-03 08:53:57 得分 0

我试过了还是不行。  
  请高手们帮帮忙。Top

相关问题

关键词

得分解答快速导航

  • 帖主:shwns

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo