Microsoft KB Archive/268797

= PRB: Client Cursor Engine May Not Asynchronously Fetch Against a Custom OLE DB Provider =

Article ID: 268797

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Data Access Components 2.5
 * Microsoft Data Access Components 2.6
 * Microsoft Data Access Components 2.7

-



This article was previously published under Q268797



SYMPTOMS
When you use ActiveX Data Objects (ADO) and set the CursorLocation property for Connection or Recordset to adUseClient, and specify asynchronous fetching with adAsyncFetch and adAsyncFetchNonBlocking for the execution options of the Execute or Open method, the client cursor engine creates a background thread to fetch data from the OLE DB Provider. With a custom provider, you may see the data fetched synchronously (the call to Execute or Open doesn't return until all of the data has been fetched).



CAUSE
Because the cursor engine fetches from the provider on different threads in the asynchronous case, the provider is required to return DBPROPVAL_RT_FREETHREAD for the rowset property DBPROP_ROWTHREADMODEL.



RESOLUTION
To allow the background fetching, a provider must return DBPROPVAL_RT_FREETHREAD for the rowset property DBPROP_ROWTHREADMODEL. This is necessary because the cursor engine is creating a secondary thread, which will continue fetching the data from the underlying rowset. The cursor engine is ensuring that apartment model rules are not being broken.



STATUS
The behavior is by design.

Additional query words: async asynch

Keywords: kbprovider kbdatabase kbprb KB268797

-

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

© Microsoft Corporation. All rights reserved.