FIX: Invalid Cursor State Using Visual FoxPro ODBC DriverLast reviewed: September 19, 1997Article ID: Q154683 |
The information in this article applies to:
SYMPTOMSOpening a CRecordset based on a data source that uses Visual FoxPro ODBC driver version 1.00.0083 may throw a CDBException with the following message (only with DB Tracing Enabled via "MFC Tracer" utility):
"Invalid Cursor State" State 24000 native 0The error occurs when SQLExtendedFetch is executed in CRecordset::InitRecord(). This code is at line 2597 in DBCORE.cpp.
CAUSE"Background Fetching" is enabled in the Data Source Setup dialog box for the data source. Background fetching determines whether records are fetched in the background (progressive fetching) or whether your application will wait until all records in the result set are fetched. Having "Background Fetching" enabled triggers a bug within the FoxPro driver when used with the Cursor Library. This bug is intermittent but frequent with larger recordsets. NOTE: The use of threads by an ODBC driver does not inherently imply that the driver is thread-safe. See the release notes of the driver for more information. Dynasets are also not supported with this version of the FoxPro ODBC Driver.
RESOLUTIONTurn off "Background Fetching" in the Data Source Setup dialog box for the data source.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. The bug has been fixed in the latest version of the Visual FoxPro driver. For additional information about how to obtain the latest driver, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q157767 TITLE : FILE: Updated Visual FoxPro ODBC Driver 5.0 Now Available MORE INFORMATIONThe error occurs randomly when using snapshot and cursor library and opening a recordset that results in a fairly large result set. The error DOES NOT occur if you:
REFERENCESSee the Visual FoxPro ODBC Driver help file (DRVVFP.HLP). The following FoxPro article discusses how to receive the latest FoxPro ODBC Driver:
ARTICLE-ID: Q149840 TITLE: Visual FoxPro ODBC Driver 1.0 Available in MS Software Library Keywords : MfcDatabase kbprg kbprg Technology : kbMfc Version : 4.0 4.1 Platform : NT WINDOWS Issue type : kbprb Solution Type : kbfix |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |