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

能帮我解决个简单的分页问题吗???????
<%
StrConn= "DRIVER={SQL   Server};SERVER=semhq29;UID=sa;PWD=sema512;DATABASE=DDS_DB "
Set   Conn   =   Server.CreateObject( "ADODB.Connection ")
Conn.Open   StrConn

Set   rs   =   Server.CreateObject   ( "ADODB.Recordset ")
sql= "select   APPLY_DEPARTMENT,APPLIER,MAJOR_IDEA,IT_UNDERTAKER,APPLY_TIME,WISH_FINISH_TIME,TOTESTTIME,REQUIRE_ESTI.PHASE   from   songzw.REQUIRE_BILL     inner   join   REQUIRE_ESTI     on   songzw.REQUIRE_BILL.IT_NO=REQUIRE_ESTI.IT_NO   "      
rs.Open   sql,   conn,   1
page=1    
rs.PageSize   =   5  

if   Not   IsEmpty(Request( "Page "))   then  

Page   =   CInt(Request( "Page "))  
   
    if   Page   >   rs.PageCount   then  
        rs.AbsolutePage   =   rs.PageCount  
       
    elseif   Page   <=   0   then  
        Page   =   1  
    else
        rs.AbsolutePage   =   Page  
    end   if
End   if
Page   =   rs.AbsolutePage  
%>
<%  
For   i   =   1   to   rs.PageSize
if   rs.EOF   then      
Exit   For  
end   if  
%>


<TABLE   cellPadding=1   align= "center "   cellSpacing=1   align=center   border=1     width= "900 "   height= "1 "   >  
<%
      response.write " <tr> "
      response.write " <td     width=100>   需求单位     </td> "
      response.write " <td     width=100>   需求提出人   </td> "
      response.write " <td     width=100>   主旨   </td> "
      response.write " <td     width=100>   资讯主办   </td> "
      response.write " <td     width=100>   需求提出日期 </td> "
response.write " <td     width=100>   希望上线日期   </td> "
          response.write " <td     width=100>   预估完成日期     </td> "
      response.write " <td     width=100>   状态 </td> "
        response.write " <td     width=100>   说明 </td> </tr> "


Set   Rs   =   server.CreateObject( "Adodb.Recordset ")      
'sql= "select   APPLY_DEPARTMENT,APPLIER,MAJOR_IDEA,IT_UNDERTAKER,APPLY_TIME,WISH_FINISH_TIME,TOTESTTIME,REQUIRE_ESTI.PHASE   from   songzw.REQUIRE_BILL     inner   join   REQUIRE_ESTI     on   songzw.REQUIRE_BILL.IT_NO=REQUIRE_ESTI.IT_NO   "              

sql= "select   APPLY_DEPARTMENT,APPLIER,MAJOR_IDEA,IT_UNDERTAKER,APPLY_TIME,WISH_FINISH_TIME,TOTESTTI