我做的一个分页程序,各位帮忙看看是错在哪里了?

remember2000 2004-08-06 05:30:51
1、分页显示

<%
dim MaxPerPage
dim totalPage
dim page
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>

<%
Dim jobCnn
Dim jobStr
Dim jobRs
set jobCnn=Server.CreateObject("ADODB.Connection")
jobCnn.Open MM_teamtekdata_STRING //MM_teamtekdata_STRING已经在别的文件中获取路径的
jobStr="select * from job"
set jobRs=Server.CreateObject("ADODB.Recordset")
jobRs.open jobStr,jobCnn,1,1
if jobRs.eof and jobRs.bof then
response.write "没有任何人才信息"
else
jobRs.pagesize=2
MaxPerPage=jobRs.pagesize
totalPage=jobRs.pagecount
if CurrentPage<1 then
CurrentPage=1
end if
if CurrentPage>totalPage then
CurrentPage=totalPage
end if
if CurrentPage>1 then
jobRs.move (CurrentPage-1)*MaxPerPage
dim bookmark
bookmark jobRs.bookmark
end if

dim i
i=1
do while not jobRs.eof and i<=2
%>
…………中间插入要显示的部分
<% i=i+1 //循环部分!
jobRs.movenext
loop
jobRs.close
jobCnn.close
set jobRS=nothing
set jobCnn=nothing
%>

----------------------下面部分是翻页显示代码
<a href="jobexample.asp?page=1">首页  </a>
<a href="jobexample.asp?page=<%=CurrentPage-1%>">上一页  </a>
<a href="jobexample.asp?page=<%=CurrentPage-1%>">下一页  </a>
<a href="jobexample.asp?page=<%=totalPage%>">末页</a>

提示的错误为:错误类型:
Microsoft VBScript 编译器错误 (0x800A03FB)


请帮忙解决一下!!谢谢
...全文
110 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
街头小贩 2004-08-06
  • 打赏
  • 举报
回复
楼上贴的哪贴不错!好好研究一下
sinusoid 2004-08-06
  • 打赏
  • 举报
回复
http://search.csdn.net/Expert/topic/2197/2197562.xml?temp=.7916223

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧