[求助]rs.pageCount怎么是-1
目的是实现网页的分页显示,可是这其中的pagecount居然是-1,真是搞不懂了,请高手指点下!~谢谢!~
<body>
<%
sub ShowPage(rs,ipage)
response.write("<table> <tr> <td width=230 class=main><form method=""post"" action=""index.asp"" name=""myform""> 输入页码:<select name=""page"">")
for i=1 to rs.pagecount
response.write "<option"
if ipage=i then
response.write"selected"
end if
response.write ">" & "</option>"
next
response.write("</select><input type=""submit"" name=""submit"" value=""打开""></form></td>")
if ipage>1 then
response.write "<td widt=250 class=main><a href=index.asp?page=1>第一页</a></td>"
esle
response.write "<td width=250 class=main>第一页</td>"
end if
if ipage>1 then
response.write "<td width=250 calss=main><a href=index.asp?page=" & (ipage-1) & ">上一页</a></td>"
else
response.write "<td width=250 class=main>上一页</td>"
end if
if ipage<>rs.pagecount then
response.write "<td width=250 calss=main><a href=index.asp?page=" & (ipage+1 )& ">下一页</a></td>"
else
response.write "<td width=250 class=main>下一页</td>"
end if
if ipage<>rs.pagecount then
response.write "<td width=250 class=main><a href=index.asp?page=" & rs.pagecount & ">最后一页</a></a></td>"
else
response.write "<td width=250 class=main>最后一页</td>"
end if
%>
<td width=200 class=main height="13" align="center"><font color="#ff0000"><%=ipage%>/<%=rs.pagecount%></font></td></table> '这一行的rs.pagecount怎么会是-1?
<% end sub %>
</body>