<%
dim connstr '连接字符串
dim db '数据库文件路径
db = "../database/golfers.mdb"
connstr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
set rsObj = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * FROM news WHERE 1 = 1"
strSQL = strSQL&" ORDER by newsid desc"
rsObj.Open strSQL, conn, 2,1
rsObj.pagesize = conMaxPerPage
%>
<%=rsObj.recordCount%><br><%=rsObj.pageCount%>
数据库里是有数据的