IRowsetUpdate : IRowsetChange

OLE DB Programmer's Reference

IRowsetUpdate enables consumers to delay the transmission of changes made with IRowsetChange to the data store. This interface also enables consumers to undo changes before transmission.

IRowsetUpdate is optional.

When to Implement

Rowsets that want to allow delayed transmission of changes and to support undo capabilities implement IRowsetUpdate. Generally, this requires the rowset to locally cache a copy of each row as it is changed with IRowsetChange::SetData.

If IRowsetUpdate is not requested as a property of the rowset, it must not be exposed by the rowset.

When to Call

If IRowsetUpdate is exposed on the rowset, changes made through IRowsetChange are buffered in the rowset and not transmitted to the data store until IRowsetUpdate::Update is called; this is known as delayed update mode. If IRowsetUpdate is not exposed on the rowset, changes made through IRowsetChange are immediately transmitted to the data store; this is known as immediate update mode. For more information, see "Changing Data" in Chapter 5: Updating Data in Rowsets.

The consumer calls the methods in IRowsetChange to update, delete, and insert rows. The rowset buffers these changes. When the consumer is ready to transmit these changes to the data store, it calls IRowsetUpdate::Update. Before calling Update, the consumer can back out any changes with IRowsetUpdate::Undo.

Method Description
GetOriginalData Gets the data most recently fetched from or transmitted to the data store; does not get values based on pending changes.
GetPendingRows Returns a list of rows with pending changes.
GetRowStatus Returns the status of rows.
Undo Undoes any changes made to a row since it was last fetched or since Update was called for it.
Update Transmits any changes made to a row since it was last fetched or since Update was called for it.
(Inherited) All methods of IRowsetChange.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net