''记录总数
iRs=ors.ResultSet() ''''返回ResultSet
If iRecCount<1 Then%>
<tr bgcolor="">
<td >暂无记录</td>
</tr>
<%
Else
For i=0 To Ubound(iRs,2)%>
<tr bgcolor="#FFFFFF">
<td><%=iRs(0,i)%></td>
<td><%=iRs(1,i)%></td>
<td><%=left(iRs(2,i),20)%></td>
<td><%=iRs(3,i)%></td>
</tr><%
Next
End If
%>
</table>
<table width="760" border="0" cellspacing="2" cellpadding="2" align="center">
<tr>
<td>
<%ors.ShowPage()%>
</td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td align="center">
<%endtime=timer()%>
本页面执行时间:<%=FormatNumber((endtime-startime)*1000,3)%>毫秒</td>
</tr>
</table>
</body>
</html>
<%
iRs=NULL
ors=NULL
Set ors=NoThing
%>
demoMSSQL.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Cls_vbsPage.asp"-->
<%
''''-----------------------------------------------------------------------------------------------
On Error Resume Next
DIM startime,endtime
''''统计执行时间
startime=timer()
''''连接数据库
DIM Db,Conn,Rs
strSQLServerName = "(local)" ''''服务器名称或地址
strSQLDBUserName = "sa" ''''数据库帐号
strSQLDBPassword = "19811030" ''''数据库密码
strSQLDBName = "showoTemp" ''''数据库名称
Set Conn = Server.CreateObject("ADODB.Connection")
Db = "Provider=SQLOLEDB.1;Persist Security Info=False;Server=" & strSQLServerName & ";User ID=" & strSQLDBUserName & ";Password=" & strSQLDBPassword & ";Database=" & strSQLDBName & ";"
Conn.open Db
''''-----------------------------------------------------------------------------------------------
%>
<html>
<head>
<title>叶子ASP分页类-mssql调用示范</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
table { font-size: 12px}
a { font-size: 12px; color: #000000; text-decoration: none}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="760" border="0" cellspacing="2" cellpadding="2" align="center" height="30">
<tr>
<td> </td>
</tr>
</table>
<table width="760" border="1" cellspacing="0" cellpadding="4" align="center" bordercolordark="#FFFFFF" bordercolorlight="#CCCCCC">
<tr align="center">
<td width="20">ID</td>
<td>标题</td>
<td>内容(显示前20个字)</td>
<td>时间</td>
</tr>
<%
Dim ors
Set ors=new Cls_vbsPage ''''创建对象
Set ors.Conn=conn ''''得到数据库连接对象
With ors
.PageSize=13 ''''每页记录条数
.PageSize=13 ''''每页记录条数
.PageName="Pages" ''''cookies名称
.DbType="MSSQL"
''''数据库类型,AC为access,MSSQL为sqlserver2000存储过程版,MYSQL为mysq