Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 268797 - Last Review: May 12, 2003 - Revision: 2.1
PRB: Client Cursor Engine May Not Asynchronously Fetch Against a Custom OLE DB Provider
This article was previously published under Q268797
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).
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.
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.
The behavior is by design.
APPLIES TO
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
| kbdatabase kbprb kbprovider KB268797 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate