Share via


EventConnection Property

EventConnection Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The Microsoft ActiveX Data Objects (ADO) Connection object for the current event. This property is read-only.

Applies To

IExStoreDispEventInfo Interface

Type Library

EXOLEDB Type Library

DLL Implemented In

EXOLEDB.DLL

Syntax

[Visual Basic]Property EventConnection As Object

[C++]HRESULT get_EventConnection(IDispatch** pConnection);

Parameters

  • pConnection
    Upon successful return, the passed address contains a valid IDispatch object reference on the ADO Connection object used to bind to the store.

Remarks

This property returns the IDispatch interface pointer for the ADO Connection object created in the context of the event. This method is similar to the GetEventSession Method, except that OLE Automation-compatible ADO objects and interfaces are returned rather than OLE DB objects and interfaces.

For synchronous events, the event session executes within a local transaction. For an asynchronous event, the object is created implicitly using an IBindResource::Bind call. The object is created within the security context of the default user. Access is limited to the event item.

Example

[Visual Basic]

Private Sub IExStoreAsyncEvents_OnSave( _ ByVal pEventInfo as ExevtsnkLib.IExStoreEventInfo, _ ByVal bstrURLSource as String, _ ByVal lFlags as Long _ )

' Get an OA compatible interface Dim iDispEvtInfo as IExStoreDispEventInfo Set iDispEvtInfo = pEventInfo

' Get the Connection used for the event Dim Conn as ADODB.Connection Set Conn = iDispEvtInfo.EventConnection ' ... End Sub

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.