EventRecord Property

Topic Last Modified: 2006-06-13

The Microsoft® ActiveX® Data Objects (ADO) Record object bound to the item that caused the event. This property is read-only.

Applies To

IExStoreDispEventInfo Interface

Type Library

EXOLEDB Type Library

DLL Implemented In

EXOLEDB.DLL

Syntax

Property EventRecord As Object
HRESULT get_EventRecord(IDispatch** ppRecord);

Parameters

  • ppRecord
    On successful return, the passed address contains the IDispatch interface of the ADO Record object bound to the store item that triggered the event.

Remarks

This property returns the IDispatch interface on the ADO Record object created in the context of the event. This method is similar to the GetEventItem Method, except that OLE Automation-compatible ADO objects and interfaces are used rather than OLE DB objects and interfaces.

For synchronous events, the event session executes within a local transaction.

For an asynchronous event, the EventRecord Property does not return the event item. An alternative for retrieving the event item is to open an ADO Record object using the item's URL, which is passed in via the bstrURLItem paramater of the OnSave Method.

Example


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

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

  ' Get the record that triggered the event
  Dim Rec as ADODB.Record
  Set Rec = iDispEvtInfo.EventRecord
  ' ...
End Sub