ADO MaxRecords Property


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).

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
%>

Goto Recordset Object Complete Reference
Share this article :
 
Copyright © 2012. Best Online Tutorials | Source codes | Programming Languages - All Rights Reserved