Hold Rows Property

ADO and SQL Server

ADO and SQL Server

Hold Rows Property

The Hold Rows property specifies whether the recordset allows the application to retrieve more rows or change the next fetch position, while holding previously fetched rows or rows with pending changes.

Applies To
Command Object Recordset Object
Syntax

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

Parts

object

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

value

Boolean specifying whether the application can retrieve more rows, as described in Settings.

Settings
Value Description
True The recordset allows the application to retrieve more rows or change the next fetch position, while holding previously fetched rows or rows with pending changes.
False The recordset requires pending changes to be transmitted to the database and all rows to be released before fetching additional rows, inserting new rows, or changing the next fetch position.

Data Type

adBoolean

Modifiable

Read/write

OLE DB Property

DBPROP_CANHOLDROWS

Remarks

If the provider makes no optimizations for releasing all rows between fetches, it is not required to return DB_E_ROWSNOTRELEASED when retrieving rows without releasing the previously held set of row handles. Such providers do not return an error when setting the Hold Rows property to False, but always return True if the consumer calls Hold Rows.