一聚教程网:一个值得你收藏的教程网站

热门教程

一个分页的例子

时间:2022-07-02 23:41:06 编辑:袖梨 来源:一聚教程网

实现对新闻的分页例子,源代码如下:

<%
strCode = Request.QueryString("itemcode")
Set Conn = Server.CreateObject("Adodb.Connection")
Conn.Open Application("tt18_ConnectionString")
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql="select * from NewsHeadC where itemcode = ""&strCode&"" order by TrDate DESC,a.NewsTime DESC"
Rs.Open Sql,Conn,1,3
Rs.PageSize = 15
Count = Rs.PageCount
if Rs.BOF or Rs.EOF then
    Response.Write "" & vbCrlf
    Response.Write "" & vbCrlf
    Response.Write "