日期:2014-05-17  浏览次数:20977 次

asp分页时记录会不出现!!!
如:数据库有12条记录,分页时pagesize=10,在分页时第一页正常,单击下一页时,剩余的记录竟然不会出现,只显示为空,请问高手这是什么原因?
<%@   CODEPAGE= "936 "%>
<!--#include   file= "../inc/includeTeacher.asp "-->
<%
      dim   teachingplanID,teachingGrade,teachingSubject,Page,sql
     
      teachingGrade=trim(request( "teachingGrade "))
      teachingSubject=trim(request( "teachingSubject "))
      Page=cint(trim(request.QueryString( "page ")))
      if   Page <=0   then
            Page=1
      end   if
      sql= "select   *   from   teachingplan   where   teachingplanID> 0 "
      if   teachingGrade <> " "   then
            sql=sql   &   "and   teachingGrade= ' "   &   teachingGrade   &   " ' "
      end   if
      if   teachingSubject <> " "   then
    sql=sql   &   "and   teachingSubject= ' "   &   teachingSubject   &   " '   "
      end   if      
      sql=sql   &   "   order   by   teachingplanID   asc " 'desc降序asc升序
      set   rs=createobject( "adodb.recordset ")      
      rs.open   sql,conn,1,1
     
%>
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<title> 备课系统 </title>
<style   type= "text/css ">
<!--
.TableLine   {
border:   1px   solid   #6BC804;
margin:   1px;
width:   auto;
}
-->
</style>
</head>

<body   background= "image/bg.gif "   link= "#669933 "   vlink= "#669933 "   alink= "#669933 ">
<div   align= "center ">   </div>
    <div   align= "center ">   <br>
        <br>
    </div>
   
<div   align= "center "> <font   color= "#669933 "   size= "5 "> <strong> <img   src= "image/teachingplan_list.gif "   width= "165 "   height= "61 "> </strong> </font>  
</div>  
</div>
<table   width= "100% "   border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "1 "   class= "TableLine ">
    <tr>  
        <td   width= "55 "   background= "image/table_bg.gif ">   <div   align= "center "> <font   color= "#669933 "   size= "2 "> 选中 </font> </div> </td>
        <td   width= "55 "   back