The information in this article applies to:
SYMPTOMSWhen using a snapshot recordset with the cursor library loaded passing TRUE for the last argument of CDatabase::Open() or using the CDatabase::useCursorLib flag in the OpenEx() call), you may receive the following ODBC error when trying to do any operation on the recordset following a directory change:
CAUSEThe cursor library creates a temporary file that is used for caching results of the recordset. This temporary file, which starts with CTT..., is created in the current working directory. If the current working directory is changed while a recordset is open, the "Invalid Cursor State" error can occur. RESOLUTION
Do not change working directories while a recordset is open or do not use
the cursor library. If you must change the current working directory, save
and restore it before performing the next CRecordset operation. Do this by
using the GetCurrentDirectory() and SetCurrentDirectory() Windows API
functions.
STATUS
This behavior is by design. Additional query words:
Keywords : kbprg kbADO150fix kbDatabase kbMFC kbODBC kbVC kbVC210bug kbVC400bug kbVC410bug kbVC420bug kbVC500bug kbGrpVCDB kbGrpMDAC |
Last Reviewed: August 11, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |