叶子asp分页类(11)
<%
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>
内容版权声明:除非注明,否则皆为本站原创文章。