我做的一个分页程序,各位帮忙看看是错在哪里了?
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)
请帮忙解决一下!!谢谢