网络学院 w3pop社区 网络资源 IT新闻

w3pop.com :: 网络学院 :: ADO :: ADO PageSize 属性

会员登陆

帐号

密码

回答

记住密码

忘记密码? 注册

ADO PageSize 属性


作者:w3pop.com 翻译/整理:w3pop.com 发布:2007-04-28 浏览:1051 :: ::

The PageSize property sets or returns a long value that indicates the maximum number of records allowed on a single page of a Recordset object. Default is 10.
PageSize属性的作用是:设置或返回了一个长值,它是用于指定从记录集对象的一页中上允许返回的最大记录数。默认值为10。

Tip: To get the number of pages in a Recordset object, use the PageCount property.
提示:可以使用PageCount属性获取记录集对象中的页面数量。

Syntax
语法

objRecordset.PageSize

Example
案例

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("northwind.mdb"))
set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM Customers"
rs.Open sql,conn
rs.PageSize=5
i=rs.PageCount
response.write("The number of pages in RS=" & i)
rs.Close
conn.Close
%>

评论 (0) All