Event Notifications

OLE DB Programmer's Reference

The provider can support transaction outcome event notification by exposing IConnectionPointContainer on the session object. The consumer can expose the ITransactionOutcomeEvents interface to receive notification from the provider when a transaction is committed or aborted.

To receive event notifications, the consumer must implement the methods in ITransactionOutcomeEvents and register the interface with the provider's connection point mechanism. To do this, the consumer calls QueryInterface to request an IConnectionPointContainer interface pointer on the session, obtains the IConnectionPoint interface for IID_ITRANSACTIONOUTCOMEEVENT, and passes its ITransactionOutcomeEvents interface to that connection point. When a transaction is committed or aborted, the provider notifies each registered ITransactionOutcomeEvents interface of the outcome of the transaction.

For more information about ITransactionOutcomeEvents interface and its methods, see the Microsoft Distributed Transaction Coordinator Programmer's Reference. For more information about IConnectionPoint and IConnectionPointContainer, see the COM reference documentation.

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