IRowsetChange

The methods in IRowsetChange are used to update the values of columns in existing rows, delete existing rows, and insert new rows.

IRowsetChange requires IAccessor and IRowset.

The consumer calls methods in IRowsetChange to modify rows as follows.

SetData and InsertRow require the use of an accessor.

SetData and InsertRow can fail for a number of reasons. The most common of these is that new data values do not meet the schema or integrity constraints of the column. Furthermore, rowsets can have row-by-row and column-by-column access permissions that override the general permissions of the table or column.

If IRowsetUpdate is exposed on the rowset, then changes made through IRowsetChange are buffered in the rowset and not transmitted to the data source until IRowsetUpdate::Update is called. This is known as delayed update mode. If IRowsetUpdate is not exposed on the rowset, then changes made through IRowsetChange are immediately transmitted to the data source. This is known as immediate update mode.

Method Description
DeleteRows Deletes rows.
InsertRow Creates and initializes a new row.
SetData Sets data in one or more columns in a row.

IRowsetChange::DeleteRows

Deletes rows. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.

Note   This provider supports only one pending change when the rowset is operating in delayed update mode. DeleteRows counts as a pending change. Other changes that count as a pending change include InsertRow, SetData, and opening a strucutured storage interface (ILockBytes or ISequentialStream) by using IRowset::GetData. This is true even if you open the structured storage in read-only mode This provider requires a lock on the cursor, even when the consumer is requesting a read-structured storage.

IRowsetChange::InsertRow

Creates and initializes a new row. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.

Note   This provider supports only one pending change when the rowset is operating in delayed update mode. InsertRow is treated as a pending change in delayed update mode.

IRowsetChange::SetData

Sets data values in one or more columns in a row. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.

Note    provider supports only one pending change when the rowset is operating in delayed update mode. SetData is treated as a pending change in delayed update mode.