当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO MaxRecords 属性

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO MaxRecords 属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 335 ::
收藏到网摘: n/a

The MaxRecords property sets or returns a long value that indicates the maximum number of records to return to a Recordset object from a query. Default is zero (which means that the provider returns all requested records).
MaxRecords属性的作用是:设置或返回一个长值,它是用于指定返回到记录集对象中的最大记录数(该记录位于查询语句中)。默认值为0,它意味着技术提供对象[provider]将返回所有的被请求的记录。

This property is read/write on a closed Recordset and read-only on an open Recordset.
该属性对于关闭的记录及来说是可读/可写的,对于一个已打开的记录集来说是只读的。

Syntax
语法

objRecordset.MaxRecords

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")
rs.MaxRecords=20
sql="SELECT * FROM Customers"
rs.Open sql,conn
rs.Close
conn.Close
%>

评论 (0) All

登陆 | 还没注册?