| description | Learn more about: IRowsetChangeImpl Class | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| title | IRowsetChangeImpl Class | ||||||||||||||||||||
| ms.date | 11/04/2016 | ||||||||||||||||||||
| f1_keywords |
|
||||||||||||||||||||
| helpviewer_keywords |
|
||||||||||||||||||||
| ms.assetid | 1e9fee15-ed9e-4387-af8f-215569beca6c |
The OLE DB Templates implementation of the IRowsetChange interface in the OLE DB specification.
template <
class T,
class Storage,
class BaseInterface = IRowsetChange,
class RowClass = CSimpleRow,
class MapClass = CAtlMap <RowClass::KeyType, RowClass*>>
class ATL_NO_VTABLE IRowsetChangeImpl : public BaseInterfaceT
A class derived from IRowsetChangeImpl.
Storage
The user record.
BaseInterface
The base class for the interface, such as IRowsetChange.
RowClass
The storage unit for the row handle.
MapClass
The storage unit for all row handles held by the provider.
Header: atldb.h
| Name | Description |
|---|---|
| DeleteRows | Deletes rows from the rowset. |
| InsertRow | Inserts a row into the rowset. |
| SetData | Sets data values in one or more columns. |
| Name | Description |
|---|---|
| FlushData | Overridden by provider to commit data to its store. |
This interface is responsible for immediate write operations to a data store. "Immediate" means that when the end user (the person using the consumer) makes any changes, those changes are immediately transmitted to the data store (and cannot be undone).
IRowsetChangeImpl implements the OLE DB IRowsetChange interface, which enables updating of values of columns in existing rows, deleting rows, and inserting new rows.
The OLE DB Templates implementation supports all the base methods (SetData, InsertRow, and DeleteRows).
Important
It is strongly recommended that you read the following documentation BEFORE attempting to implement your provider:
-
Chapter 6 of the OLE DB Programmer's Reference
-
Also see how the
RUpdateRowsetclass is used in the UpdatePV sample.
Deletes rows from the rowset.
STDMETHOD (DeleteRows )(HCHAPTER /* hReserved */,
DBCOUNTITEM cRows,
const HROW rghRows[],
DBROWSTATUS rgRowStatus[]);See IRowsetChange::DeleteRows in the OLE DB Programmer's Reference.
Creates and initializes a new row in the rowset.
STDMETHOD (InsertRow )(HCHAPTER /* hReserved */,
HACCESSOR hAccessor,
void* pData,
HROW* phRow);See IRowsetChange::InsertRow in the OLE DB Programmer's Reference.
Sets data values in one or more columns.
STDMETHOD (SetData )(HROW hRow,
HACCESSOR hAccessor,
void* pSrcData);See IRowsetChange::SetData in the OLE DB Programmer's Reference.
Overridden by provider to commit data to its store.
HRESULT FlushData(HROW hRowToFlush,
HACCESSOR hAccessorToFlush);hRowToFlush
[in] Handle to the rows for the data. The type of this row is determined from the RowClass template argument of the IRowsetImpl class (CSimpleRow by default).
hAccessorToFlush
[in] Handle to the accessor, which contains binding information and type information in its PROVIDER_MAP (see IAccessorImpl).
A standard HRESULT.
OLE DB Provider Templates
OLE DB Provider Template Architecture