The information in this article applies to:
SYMPTOMSIf you attempt to use ActiveX Data Objects (ADO) to access SQL Server databases through the ODBC provider (MSDASQL), you will receive the following error if you specify adAsyncFetchNonBlocking with Server-side cursors: NOTE: If you are using the SQLOLEDB provider you will not see this error message. However, fetching is still not supported for the cursor and it is blocked until the cursor is fully populated. CAUSEThe adAsyncFetchNonBlocking recordset option is not supported with a Server cursor. Additional enhancements would be required for the server and client in order to implement this feature. The two way communication necessary to support adAsyncFetchNonBlocking with a server cursor is not available at this time. RESOLUTIONadAsyncFetchNonBlocking is only supported with a Client cursor. STATUSThis behavior is by design. MORE INFORMATIONPaste the following code in the ISQL_w window, and either select a test database or use the pubs database, and then execute the code. This code creates the test table and populates it with data. This sample uses approximately 2.5 meg of data:
The following code demonstrates the problem. Create a new project and then create a new form. Paste the following code into the General Declarations section of the form and add a Project reference to the Microsoft ActiveX Data Objects 2.x Library:
Change the CursorLocation to adUseClient to resolve the error. NOTE: You can use adAsyncExecute with a Server cursor, which enhances the responsiveness of your application. Using adAsyncExecute enables your application to perform other tasks while waiting on the server cursor to populate. However, you will not be able to use the recordset until an ExecuteComplete event fires, which indicates the server cursor is fully populated. With a Client cursor, you get more flexibility in async mode and you can check the Fetch progress of the cursor population as the rows are fetched to the client cursor. REFERENCESFor more information, see the following article in the Microsoft Knowledge Base: Q190606 PRB: QueryTimeout Event Not Available Additional query words:
Keywords : kbGrpVBDB kbGrpMDAC kbDSupport kbADO210sp2 |
Last Reviewed: November 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |