% dim conn dim connstr on error resume next connstr="DBQ="+server.mappath("../admin/#news.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" set conn=server.createobject("ADODB.CONNECTION") conn.open connstr %> <% exec= "select * from xinwen where type='59' order by newsid DESC" Set RS = Server.CreateObject("ADODB.RecordSet") rs.open exec, conn,1,1 dim currentpage currentpage=Request("currentpage") if currentpage=0 then currentpage=1 end if RecordCount = 0 do while not rs.Eof RecordCount = RecordCount +1 rs.MoveNext loop if not RecordCount=0 then rs.MoveFirst end if pageCount1=RecordCount/15 pageCount1=int(pageCount1) if (RecordCount mod 15)>0 then pageCount1=pageCount1 +1 end if %>