Remove Deleted Rows Property

ADO and SQL Server

ADO and SQL Server

Remove Deleted Rows Property

The Remove Deleted Rows property specifies whether rows that are detected as deleted are removed from the recordset.

Applies To
Command Object Recordset Object
Syntax

object.Properties("Remove Deleted Rows") [= value]

Parts

object

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

value

Boolean that indicates whether rows are removed from the recordset, as specified in Settings.

Settings
Value Description
True The provider removes rows it detects as having been deleted from the recordset. Therefore, fetching a block of rows that formerly included a deleted row does not return that row.
False The provider deletes the rows, but does not remove them from the recordset. If the user fetches a block of rows containing a deleted row, that row appears in the recordset.

Any method that retrieves a deleted row will return a code of DB_E_DELETEDROW.


Data Type

adBoolean

Modifiable

Read/write

OLE DB Property

DBPROP_REMOVEDELETED

Remarks

This property is independent of the transaction isolation level. While the transaction isolation level in some cases determines whether the recordset can detect a row as having been deleted, it has no effect on whether or not the recordset removes that row.

For programmers accustomed to the cursor model in ODBC, the value of this property is always True for recordsets implemented using dynamic cursors because dynamic cursors always remove deleted rows. Whether static and keyset-driven cursors remove deleted rows depends on the value of the Remove Deleted Rows property.