w3pop.com :: 网络学院 :: ADO :: ADO PageCount 属性
The PageCount property returns a long value that indicates the number of pages with data in a Recordset object.
PageCount属性的作用是:返回一个长值,用于指定记录集对象中数据页面的数量。
Tip: To divide the Recordset into a series of pages, use the PageSize property.
提示:你可以使用PageSize属性将记录集分割为一系列的页面。
Note: If the last page contains fewer records than specified in PageSize, it still counts as an additional page in the PageCount property.
注意:如果最后一页的记录数量少于在PageSize属性中指定的数量,那么它仍然被视为一页。
Note: If this method is not supported it returns -1.
注意:如果不支持这个方法,那么将返回-1。
objRecordset.PageCount |
<%
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