Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

This article was previously published under Q268797

↑ Back to the top


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).

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Status

The behavior is by design.

↑ Back to the top


Keywords: KB268797, kbprovider, kbprb, kbdatabase

↑ Back to the top

Article Info
Article ID : 268797
Revision : 3
Created on : 5/12/2003
Published on : 5/12/2003
Exists online : False
Views : 252