Rowset Properties and Behaviors

SQLOLEDB implements rowset properties as follows.

Property ID Description
DBPROP_ABORTPRESERVE R/W: Read/write
Default: VARIANT_FALSE
Description: By default, SQLOLEDB invalidates rowsets after an abort. SQLOLEDB maintains a valid rowset if the property is VARIANT_TRUE.
DBPROP_APPENDONLY The DBPROP_APPENDONLY rowset property is not implemented by SQLOLEDB. Attempting to read or write the property value generates an error.
DBPROP_
BLOCKINGSTORAGEOBJECTS
R/W: Read-only
Default: VARIANT_TRUE
Description: SQLOLEDB storage objects block the use of other rowset methods.
DBPROP_BOOKMARKS
DBPROP_
LITERALBOOKMARKS
R/W: Read/write
Default: VARIANT_FALSE
Description: SQLOLEDB supports bookmarks for rowset row identification when DBPROP_BOOKMARKS or DBPROP_
LITERALBOOKMARKS is VARIANT_
TRUE.

Setting either property to VARIANT_TRUE does not enable rowset positioning by bookmark. Set DBPROP_IRowsetLocate or DBPROP_IRowsetScroll to VARIANT_TRUE to create a rowset supporting rowset positioning by bookmark.

SQLOLEDB uses a SQL Server cursor to support a rowset containing bookmarks. For more information, see Rowsets and SQL Server Cursors.

Note   Setting these properties in conflict with other SQLOLEDB cursor-defining properties results in an error. For example, setting the DBPROP_BOOKMARKS to VARIANT_TRUE when DBPROP_OTHERINSERT is also VARIANT_TRUE generates an error when the consumer attempts to open a rowset.

DBPROP_BOOKMARKSKIPPED R/W: Read-only
Default: VARIANT_FALSE
Description: SQLOLEDB returns DB_E_
BADBOOKMARK if the consumer indicates an invalid bookmark when positioning or searching a bookmarked rowset.
DBPROP_BOOKMARKTYPE R/W: Read-only
Default: DBPROPVAL_BMK_NUMERIC
Description: SQLOLEDB implements numeric bookmarks only. A SQLOLEDB bookmark is a 32-bit unsigned integer, type DBTYPE_UI4.
DBPROP_CACHEDEFERRED The DBPROP_CACHEDEFERRED rowset property is not implemented by SQLOLEDB. Attempting to read or write the property value generates an error.
DBPROP_
CANFETCHBACKWARDS
DBPROP_
CANSCROLLBACKWARDS
R/W: Read/write
Default: VARIANT_FALSE
Description: SQLOLEDB supports backward fetching and scrolling in nonsequential rowsets. SQLOLEDB creates a cursor-supported rowset when either DBPROP_
CANFETCHBACKWARDS or DBPROP_
CANSCROLLBACKWARDS is VARIANT_
TRUE. For more information, see Rowsets and SQL Server Cursors.
DBPROP_CANHOLDROWS R/W: Read/write
Default: VARIANT_FALSE
Description: By default, SQLOLEDB returns DB_E_ROWSNOTRELEASED if the consumer attempts to obtain more rows for a rowset while pending changes exist on those currently in the rowset. This behavior can be altered.

Setting both DBPROP_CANHOLDROWS and DBPROP_IRowsetChange to VARIANT_
TRUE implies a bookmarked rowset. If both properties are VARIANT_TRUE, the IRowsetLocate interface is available on the rowset and DBPROP_BOOKMARKS and DBPROP_LITERALBOOKMARKS are both VARIANT_TRUE.

SQLOLEDB rowsets containing bookmarks are supported by SQL Server cursors.
DBPROP_
CHANGEINSERTEDROWS
R/W: Read-only
Default: VARIANT_TRUE
Description: SQLOLEDB allows the consumer to delete or change the data in newly inserted rows.
DBPROP_COLUMNRESTRICT R/W: Read-only
Default: VARIANT_FALSE
Description: SQLOLEDB sets the property to VARIANT_TRUE when a column in a rowset cannot be changed by the consumer. Other columns in the rowset may be updatable and the rows themselves may be deleted.

When the property is VARIANT_TRUE, the consumer examines the dwFlags member of the DBCOLUMNINFO structure to determine whether the value of an individual column can be written or not. For modifiable columns, dwFlags exhibits DBCOLUMNFLAGS_
WRITE.

DBPROP_COMMANDTIMEOUT R/W: Read/write
Default: 0
Description: By default, SQLOLEDB does not time out on ICommand::Execute.
DBPROP_COMMITPRESERVE R/W: Read/write
Default: VARIANT_FALSE
Description: By default, SQLOLEDB invalidates rowsets after a commit. SQLOLEDB maintains a valid rowset if the property is VARIANT_TRUE.
DBPROP_DEFERRED The DBPROP_DEFERRED rowset property is not implemented by SQLOLEDB. Attempting to read or write the property value generates an error.
DBPROP_
DELAYSTORAGEOBJECTS
R/W: Read-only
Default: VARIANT_FALSE
Description: SQLOLEDB supports immediate update mode on storage objects.

Changes made to data in a sequential stream object are immediately submitted to SQL Server. Modifications are committed based on the rowset transaction mode.
DBPROP_IAccessor
DBPROP_IColumnsInfo
DBPROP_IConvertType
DBPROP_IRowset
DBPROP_IRowsetInfo
R/W: Read-only
Default: VARIANT_TRUE
Description: SQLOLEDB supports these interfaces on all rowsets.
DBPROP_IColumnsRowset R/W: Read/write
Default: VARIANT_TRUE
Description: SQLOLEDB supports the IColumnsRowset interface.
DBPROP_
IConnectionPointContainer
R/W: Read/write
Default: VARIANT_FALSE
DBPROP_IRowsetChange
DBPROP_IRowsetUpdate
R/W: Read/write
Default: VARIANT_FALSE
Description: SQLOLEDB supports the IRowsetChange and IRowsetUpdate interfaces.

A rowset created with DBPROP_
IRowsetChange equal to VARIANT_TRUE exhibits immediate update mode behaviors.

When DBPROP_IRowsetUpdate is VARIANT_TRUE, DBPROP_IRowsetChange is also VARIANT_TRUE. The rowset exhibits delayed update mode behavior.

SQLOLEDB uses a SQL Server cursor to support rowsets exposing either IRowsetChange or IRowsetUpdate. For more information, see Rowsets and SQL Server.
DBPROP_IRowsetIdentity R/W: Read/write
Default: VARIANT_FALSE
Description: See the OLE DB Programmer's Reference.
DBPROP_IRowsetLocate
DBPROP_IRowsetScroll
R/W: Read/write
Default: VARIANT_FALSE
Description: SQLOLEDB can expose the IRowsetLocate and IRowsetScroll interfaces.

When DBPROP_IRowsetLocate is VARIANT_TRUE, DBPROP_
CANFETCHBACKWARDS and DBPROP_
CANSCROLLBACKWARDS are also VARIANT_TRUE.

When DBPROP_IRowsetScroll is VARIANT_
TRUE, DBPROP_IRowsetLocate is also VARIANT_TRUE, and both interfaces are available on the rowset.

Bookmarks are required for either interface. SQLOLEDB sets DBPROP_BOOKMARKS and DBPROP_LITERALBOOKMARKS to VARIANT_TRUE when the consumer requests either interface.

SQLOLEDB uses SQL Server cursors to support IRowsetLocate and IRowsetScroll. For more information, see Rowsets and SQL Server cursors.

Note   Setting these properties in conflict with other SQLOLEDB cursor-defining properties results in an error. For example, setting the DBPROP_IRowsetScroll to VARIANT_TRUE when DBPROP_OTHERINSERT is also VARIANT_TRUE generates an error when the consumer attempts to open a rowset.

DBPROP_IRowsetResynch R/W: Read/write
Default: VARIANT_FALSE
Description: SQLOLEDB exposes the IRowsetResynch interface on demand. SQLOLEDB can expose the interface on any rowset.
DBPROP_ISupportErrorInfo R/W: Read/write
Default: VARIANT_TRUE
Description: SQLOLEDB exposes the ISupportErrorInfo interface on rowsets.
DBPROP_ILockBytes The ILockBytes interface is not implemented by SQLOLEDB. Attempting to read or write the property generates an error.
DBPROP_ISequentialStream R/W: Read/write
Default: VARIANT_FALSE
Description: SQLOLEDB exposes the ISequentialStream interface to support long, variable-length data stored in SQL Server.
DBPROP_IStorage The IStorage interface is not implemented by SQLOLEDB. Attempting to read or write the property generates an error.
DBPROP_IStream The IStream interface is not implemented by SQLOLEDB. Attempting to read or write the property generates an error.
DBPROP_IMMOBILEROWS R/W: Read/write
Default: VARIANT_TRUE
Description: SQLOLEDB alters the value of the property based on the visibility of changes to the SQL Server data exposed by the rowset. The consumer cannot ever insert rows at a specified location in a SQLOLEDB rowset. Regardless of the property value, SQLOLEDB never reorders a rowset when a row is added to it.

VARIANT_TRUE
Rows inserted by the consumer appear at the end of the current block of rows held in the rowset. Rows inserted by other SQL Server users are not visible to the rowset. DBPROP_
OTHERINSERT is VARIANT_FALSE.

VARIANT_FALSE
Rows inserted by the consumer appear at the end of the current block of rows held in the rowset. However, scrolling the rowset could cause the row to appear in its SQL Server-determined position. This is especially true if the SQL Server table maintaining the rowset data is constrained by a clustered primary key. DBPROP_OTHERINSERT is VARIANT_TRUE.

This property only has value for rowsets supported by SQL Server cursors. For more information, see Rowsets and SQL Server Cursors.

Note   Setting this property in conflict with other SQLOLEDB cursor-defining properties results in an error. For example, setting the property to VARIANT_TRUE when DBPROP_OTHERINSERT is also VARIANT_TRUE generates an error when the consumer attempts to open a rowset.

DBPROP_
LITERALIDENTITY
R/W: Read-only
Default: VARIANT_TRUE
Description: See the OLE DB Programmer's Reference.
DBPROP_MAXOPENROWS R/W: Read-only
Default: 0
Description: SQLOLEDB does not limit the number of rows that can be active in rowsets.
DBPROP_
MAXPENDINGROWS
R/W: Read-only
Default: 0
Description: SQLOLEDB does not limit the number of rowset rows with changes pending.
DBPROP_MAXROWS R/W: Read/Write
Default: 0
Description: By default, SQLOLEDB does not limit the number of rows in a rowset. When the consumer sets DBPROP_MAXROWS, SQLOLEDB uses the SET ROWCOUNT statement to limit the number of rows in the rowset.

SET ROWCOUNT can cause unintended consequences in SQL Server statement execution.
DBPROP_
MAYWRITECOLUMN
The DBPROP_MAYWRITECOLUMN rowset property is not implemented by SQLOLEDB. Attempting to read or write the property value generates an error.
DBPROP_MEMORYUSAGE The DBPROP_MEMORYUSAGE rowset property is not implemented by SQLOLEDB. Attempting to read or write the property value generates an error.
DBPROP_
NOTIFICATIONGRANULARITY
The DBPROP_
NOTIFICATIONGRANULARITY rowset property is not implemented by SQLOLEDB. Attempting to read or write the property value generates an error.
DBPROP_
NOTIFICATIONPHASES
R/W: Read-only
Default: DBPROPVAL_NP_OKTODO |
DBPROPVAL_NP_ABOUTTODO |
DBPROPVAL_NP_SYNCHAFTER |
DBPROPVAL_NP_FAILEDTODO |
DBPROPVAL_NP_DIDEVENT
Description: SQLOLEDB supports all notification phases.
DBPROP_NOTIFYCOLUMNSET
DBPROP_NOTIFYROWDELETE
DBPROP_
NOTIFYROWFIRSTCHANGE
DBPROP_
NOTIFYROWINSERT
DBPROP_
NOTIFYROWRESYNCH
DBPROP_
NOTIFYROWSETRELEASE
DBPROP_
NOTIFYROWSETFETCH-
POSITIONCHANGE
DBPROP_
NOTIFYROWUNDOCHANGE
DBPROP_
NOTIFYROWUNDODELETE
DBPROP_
NOTIFYROWUNDOINSERT
DBPROP_
NOTIFYROWUPDATE
R/W: Read-only
Default: DBPROPVAL_NP_OKTODO |
DBPROPVAL_NP_ABOUTTODO
Description: SQLOLEDB notification phases are cancelable prior to an attempt to perform the rowset modification indicated. SQLOLEDB does not support phase cancellation after the attempt has completed.
DBPROP_
ORDEREDBOOKMARKS
The DBPROP_ORDEREDBOOKMARKS rowset property is not implemented by SQLOLEDB. Attempting to read or write the property value generates an error.
DBPROP_OTHERINSERT
DBPROP_
OTHERUPDATEDELETE
DBPROP_OWNINSERT
DBPROP_
OWNUPDATEDELETE
R/W: Read/write
Default: VARIANT_FALSE
Description: Setting change visibility properties causes SQLOLEDB to use SQL Server cursors to support the rowset. For more information, see Rowsets and SQL Server.
DBPROP_QUICKRESTART R/W: Read/write
Default: VARIANT_FALSE
Description: See the OLE DB Programmer's Reference.
DBPROP_
REENTRANTEVENTS
R/W: Read-only
Default: VARIANT_TRUE
Description: SQLOLEDB rowsets are reentrant and can return DB_E_NOTREENTRANT if a consumer attempts to access a non-reentrant rowset method from a notification callback.
DBPROP_REMOVEDELETED R/W: Read/write
Default: VARIANT_FALSE
Description: SQLOLEDB alters the value of the property based on the visibility of changes to the SQL Server data exposed by the rowset.

VARIANT_TRUE
Rows deleted by the consumer or other SQL Server users are removed from the rowset when the rowset is refreshed. DBPROP_OTHERINSERT is VARIANT_TRUE.

VARIANT_FALSE
Rows deleted by the consumer or other SQL Server users are not removed from the rowset when the rowset is refreshed. The row status value for deleted SQL Server rows in the rowset is DBROWSTATUS_E_DELETED. DBPROP_
OTHERINSERT is VARIANT_FALSE.

This property only has value for rowsets supported by SQL Server cursors. For more information, see Rowsets and SQL Server.
DBPROP_
REPORTMULTIPLECHANGES
R/W: Read-only
Default: VARIANT_FALSE
Description: See the OLE DB Programmer's Reference.
DBPROP_
RETURNPENDINGINSERTS
R/W: Read-only
Default: VARIANT_FALSE
Description: When a method that fetches rows is called, SQLOLEDB does not return pending insert rows.
DBPROP_ROWRESTRICT R/W: Read-only
Default: VARIANT_FALSE
Description: SQLOLEDB rowsets do not support access rights based on the row. If IRowsetChange is exposed on a rowset, then SetData can be called by the consumer.
DBPROP_ROWSET_ASYNCH The DBPROP_ROWSET_ASYNCH rowset property is not implemented by SQLOLEDB. Attempting to read or write the property value generates an error.
DBPROP_
ROWTHREADMODEL
R/W: Read-only
Default: DBPROPVAL_RT_FREETHREAD
Description: SQLOLEDB supports access to its objects from multiple execution threads of a single consumer.
DBPROP_SERVERCURSOR R/W: Read/write
Default: VARIANT_FALSE
Description: When set, a SQL Server cursor is used to support the rowset. For more information, see Rowsets and SQL Server.
DBPROP_STRONGIDENTITY R/W: Read-only
Default: VARIANT_FALSE
Description: See the OLE DB Programmer's Reference.
DBPROP_
TRANSACTEDOBJECT
R/W: Read-only
Default: VARIANT_FALSE
Description: SQLOLEDB supports only transacted objects. For more information, see Transactions.
DBPROP_UPDATABILITY R/W: Read/write
Default: 0
Description: SQLOLEDB supports all DBPROP_UPDATABILITY values. Setting DBPROP_UPDATABILITY does not create a modifiable rowset. To make a rowset modifiable, set DBPROP_IRowsetChange or DBPROP_IRowsetUpdate.

SQLOLEDB defines the provider-specific property set DBPROPSET_
SQLSERVERROWSET as follows.

Property ID Description
SSPROP_CONCURRENCY Column: No
R/W: Read/write
Type: VT_I4
Default: SSPROPVAL_CONCUR_READ_ONLY
Description: Concurrency control method.

The SSPROP_CONCURRENCY property has meaning only when a SQLOLEDB rowset is supported by a SQL Server cursor.

SSPROPVAL_CONCUR_ROWVER
SQLOLEDB uses row versioning to determine a concurrent access violation. The SQL Server table or tables represented in the rowset must contain a SQL Server row-versioning timestamp column.

SSPROPVAL_CONCUR_VALUES
SQLOLEDB uses the values of columns in the rowset row to determine a concurrent access violation.

SSPROPVAL_CONCUR_LOCK
SQL Server locks rows present in the SQLOLEDB rowset. SQL Server prevents row access by SQLOLEDB rowsets generated on any other session or by users connecting another way.

SSPROPVAL_CONCUR_READ_ONLY
The rowset is read-only. Any other connected user can concurrently access the SQL Server rows in the rowset.
SSPROP_HIDDENCOLUMNS Column: No
R/W: Read/write
Type: VT_BOOL
Default: VARIANT_FALSE
Description: FOR BROWSE versioning columns.

SSPROP_HIDDENCOLUMNS has meaning only if the rowset was created from command text specifying the Transact-SQL FOR BROWSE clause in a SELECT statement.

VARIANT_TRUE
The rowset includes the table primary key and/or timestamp columns that allow row identification.

VARIANT_FALSE
The rowset does not include row-identifying columns.
SSPROP_MAXBLOBLENGTH Column: No
R/W: Read/write
Type: VT_I4
Default: 0
Description: SQLOLEDB executes a SET TEXTLENGTH statement to restrict the length of BLOB data returned in a SELECT statement.
SSPROP_NOBROWSETABLE Column: No
R/W: Read/write
Type: VT_BOOL
Default: VARIANT_FALSE
Description: No temporary table created on FOR BROWSE.

SSPROP_NOBROWSETABLE has meaning only if the rowset has been created from command text specifying the Transact-SQL FOR BROWSE clause in a SELECT statement.

VARIANT_TRUE
A temporary table is not created to support a Transact-SQL SELECT statement containing the FOR BROWSE clause.

VARIANT_FALSE
A temporary table is created to support a Transact-SQL SELECT statement containing the FOR BROWSE clause.
SSPROP_POSITIONONNEWROW Column: No
R/W: Read/write
Type: VT_BOOL
Default: VARIANT_FALSE
SSPROP_TEXTPTRLOGGING Column: No
R/W: Read/write
Type: VT_BOOL
Default: VARIANT_TRUE
Description: Log text and image writes.

SQL Server can perform nonlogged writes of long, variable, data type columns.

VARIANT_TRUE
Log SQL Server text and image column writes originating from the rowset.

VARIANT_FALSE
Do not log SQL Server text and image column writes originating from the rowset.

Caution: After performing nonlogged operations against a SQL Server database, the database must be backed up to ensure proper recovery. The database cannot be recovered from transaction log backups and attempting to backup the transaction log results in an error.

See Also

Transactions