主题:  帮帮忙,看一下为什么asp分页会出错呢

sworldfish

职务:普通成员
等级:1
金币:0.0
发贴:11
#12003/3/31 12:24:46



New Document
<% const intpagesize=5
dim rs,intcur,i,inttotal
if request.servervariables("content_length")=0 then
     intcur=1
else
     intcur=cint(request.form("curpage"))
     select case request.form("page")
     case "首页"
     intcur=1
case "下一页"
     intcur=intcur+1
case "上一页"
     intcur=intcur-1
case "尾页"
     intcur=cint(request.form("lastpage"))
end select
end if
set cn=server.createobject("adodb.connection")

cn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=F:\one\database\booree.mdb"


set rs =server.createobject("adodb.recordset")
strsql="select address from member "
    rs.cursortype=adopenstatic
rs.cursorlocation=aduseclient
rs.open strsql,cn
rs.cachesize=intpagesize
rs.pagesize=intpagesize
inttotal=rs.pagecount
if not rs.eof then
rs.absolutepage=intcur
end if
%>


" method="post")









<%     i=1
     with response
     if rs.eof then
            .write " there in no record!"
            else
     .write ""
end if
do until rs.eof and i< intpagesize
.write""
     rs.movenext
     i=i+1
     loop
     .write "
公司
"& rs.fields("address") &"
"
     end with
     rs.close
     %>





奔腾的心

职务:普通成员
等级:7
金币:10.0
发贴:6114
#22003/3/31 14:34:26
把出错提示也写下来吧



sworldfish

职务:普通成员
等级:1
金币:0.0
发贴:11
#32003/3/31 16:25:35
错误类型:
Microsoft VBScript 运行时错误 (0x800A01B6)
/one/add/one.asp, 第 8 行