Microsoft KB Archive/895524

= You receive a &quot;Specified resource is out-of-scope&quot; error message when you run a deep traversal query by using a connection that you obtained from the event function of the event sink =

Article ID: 895524

Article Last Modified on 10/25/2007

-

APPLIES TO


 * Microsoft Exchange Server 2003 Standard Edition
 * Microsoft Exchange Server 2003 Enterprise Edition
 * Microsoft Exchange 2000 Server Standard Edition

-





SYMPTOMS
When a Microsoft Exchange OLE DB (ExOLEDB) provider-based event sink uses the OnSave event function of the IExStoreAsyncEvents interface, the OnSave event function returns a pEventInfo parameter of an IExStoreEventInfo object. You can obtain an opened connection by casting the IExStoreEventInfo object to a type IExStoreDispEventInfo. Then, obtain the EventConnection property of the IExStoreDispEventInfo object. For more information, see the following Microsoft Visual Basic code example: 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 that is used for the event. Dim Conn as ADODB.Connection Set Conn = iDispEvtInfo.EventConnection ' ... End Sub If you use this connection to run a deep traversal query in the right scope, you receive the following error message:

Specified resource is out-of-scope.



WORKAROUND
To work around this issue, use one the following methods:
 * Open a new connection in the event sink.
 * Use a hierarchical traversal query and a shallow traversal query.

Additional query words: XADM

Keywords: kbexchdev kbprb kbinfo KB895524

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.