Maximum Rows Property

ADO and SQL Server

ADO and SQL Server

Maximum Rows Property

The Maximum Rows property specifies the maximum number of rows that can be returned in a recordset.

Applies To
Command Object Recordset Object
Syntax

object.Properties("Maximum Rows") [= value]

Parts

object

Expression that evaluates to an object in the Applies To list.

value

Integer that specifies the maximum number of rows.

Data Type

adInteger

Modifiable

Read/write

OLE DB Property

DBPROP_MAXROWS

Remarks

If no limit is specified for the Maximum Rows property, the value is set to zero.

If the application attempts to fetch a greater number of rows in a recordset than specified by the Maximum Rows property, the recordset behaves as if the table contains, or the query returns, only the quantity specified by MaximumRows. The provider returns DB_S_ENDOFROWSET.

Pending deletes do not count against the recordset limit specified by the Maximum Rows property. The provider is not required to check the Maximum Rows property when inserting or deleting rows.