Edit

Share via


IRowsetNotifyCP Class

Implements the provider site for the connection point interface IRowsetNotify.

Syntax

template <class T, class ReentrantEventSync = CComSharedMutex>
class IRowsetNotifyCP :
   public IConnectionPointImpl<
      T,
      piid = &__uuidof(IRowsetNotify),
      CComDynamicUnkArray DynamicUnkArray>,
   public ReentrantEventSync

Parameters

T
A class derived from IRowsetNotifyCP.

ReentrantEventSync
A mutex class that supports reentrancy (the default is CComSharedMutex). A mutex is a synchronization object that allows one thread mutually exclusive access to a resource.

piid
A interface ID pointer (IID*) for an IRowsetNotify connection point interface. The default value is &__uuidof(IRowsetNotify).

DynamicUnkArray
An array of type CComDynamicUnkArray, which is a dynamically allocated array of IUnknown pointers to the client sink interfaces.

Requirements

Header: atldb.h

Members

Methods

Name Description
Fire_OnFieldChange Notifies the consumer of a change to the value of a column.
Fire_OnRowChange Notifies the consumer of a change affecting the rows.
Fire_OnRowsetChange Notifies the consumer of a change affecting the entire rowset.

Remarks

IRowsetNotifyCP implements broadcast functions to advise listeners on the connection point IID_IRowsetNotify of changes to the contents of the rowset.

Note that you must also implement and register IRowsetNotify on the consumer (also known as the "sink") using IRowsetNotifyImpl so that the consumer can handle notifications. See Receiving Notifications about implementing the connection point interface on the consumer.

For detailed information on implementing notifications, see "Supporting Notifications" in Creating an Updatable Provider.

IRowsetNotifyCP::Fire_OnFieldChange

Broadcasts an OnFieldChange event to notify consumers of a change to the value of a column.

Syntax

HRESULT Fire_OnFieldChange(IRowset* pRowset,
   HROW hRow,
   DBORDINAL cColumns,
   DBORDINAL* rgColumns,
   DBREASON eReason,
   DBEVENTPHASE ePhase,
   BOOL fCantDeny);

Parameters

See IRowsetNotify::OnFieldChange in the OLE DB Programmer's Reference.

IRowsetNotifyCP::Fire_OnRowChange

Broadcasts an OnRowChange event to all listeners on the connection point IID_IRowsetNotify to notify consumers of a change affecting the rows.

Syntax

HRESULT Fire_OnRowChange(IRowset* pRowset,
   DBCOUNTITEM cRows,
   const HROW rghRows[],
   DBREASON eReason,
   DBEVENTPHASE ePhase,
   BOOL fCantDeny);

Parameters

See IRowsetNotify::OnRowChange in the OLE DB Programmer's Reference.

IRowsetNotifyCP::Fire_OnRowsetChange

Broadcasts an OnRowsetChange event to all listeners on the connection point IID_IRowsetNotify to notify consumers of a change affecting the entire rowset.

Syntax

HRESULT Fire_OnRowsetChange(IRowset* pRowset,
   DBREASON eReason,
   DBEVENTPHASE ePhase,
   BOOL fCantDeny);

Parameters

See IRowsetNotify::OnRowsetChange in the OLE DB Programmer's Reference.

See also

OLE DB Provider Templates
OLE DB Provider Template Architecture
Notifications (COM)
BEGIN_CONNECTION_POINT_MAP
END_CONNECTION_POINT_MAP
CONNECTION_POINT_ENTRY
Creating an Updatable Provider