Udostępnij za pośrednictwem


Rowset Properties in Command Objects

When creating a command that returns a rowset, the consumer can specify properties from the rowset property group that must be supported by the rowset. For example, all providers are required to expose the IRowset interface on rowset objects. IRowset enables consumers to, at minimum, navigate forward in the rowset. By requesting the DBPROP_CANSCROLLBACKWARDS rowset property, a consumer can specify that the rowset must enable the consumer to navigate through the rowset in both directions.

Other rowset properties specify interfaces that the rowset must support in addition to the mandatory ones. For example, a consumer might require interfaces to enable direct positioning within a rowset with bookmarks (DBPROP_IRowsetLocate), approximate positioning (DBPROP_IRowsetScroll), updatability of rows (DBPROP_IRowsetChange), and deferred updatability (DBPROP_IRowsetUpdate). Consumers can also specify additional properties that specialize the behavior of certain interfaces ? for example, to make some columns of the rowset updatable and the rest read-only.

Note

Rowset properties are generally ignored when executing a non?row returning command but may generate errors in some cases. For maximum interoperability, general consumers should make sure that no rowset properties are set when executing non?row returning commands.