PRB: Unable to Move to Previous Records in RecordsetLast reviewed: July 18, 1997Article ID: Q112758 |
1.50
WINDOWS
kbprg kbprb
The information in this article applies to:
The Microsoft Foundation Classes (MFC), included with: - Microsoft Visual C++ for Windows, version 1.5
SYMPTOMSWhen running an AppWizard-generated application that uses the database classes, you may note that the "move previous," "move first," and "move last" buttons on the toolbar for the record view are unavailable (dimmed or gray). This problem occurs even though you have moved past the first record, and should be able to select these toolbar buttons. The "Previous Record," "First Record," and "Last Record" choices under the Record menu are also unavailable after moving past the first record in a recordset. If you are not using AppWizard-generated code, you may notice that a call to CRecordSet::MovePrev(), ...MoveFirst() or ...MoveLast() will result in a database exception.
CAUSEThe cause for this problem is a failure of the ODBC.DLL to load the ODBCCURS.DLL file. The ODBCCURS.DLL file is the cursor library. This dynamic-link library (DLL) gives scrollable cursor functionality to ODBC Level 1 drivers. Therefore, if this DLL isn't loaded, scrollable cursor support is unavailable. A forward-only cursor will be used. There are two reasons why the cursor library (ODBCCURS.DLL) won't load:
RESOLUTIONCheck to see that the file <path>\WINDOWS\SYSTEM\ODBC.DLL is the same date or newer than <path>\MSVC\REDIST\ODBC.DLL on the Visual C++ CD. If not, copy the file from the CD to your <path>\WINDOWS\SYSTEM\DIRECTORY. If the ODBCCURS.DLL isn't located in the <path>\WINDOWS\SYSTEM directory, copy it from the <path>\MSVC\REDIST on the Visual C++ CD. NOTE: To be absolutely sure you have correct versions of the ODBC DLLs, you should run the Visual C++ Setup program again and select "Custom Installation." Then, select only the "MFC Database (ODBC)" check box so that you copy only the needed ODBC components. You will also want to select the ODBC drivers you need by clicking the Drivers button next to the "MFC Database (ODBC)" check box.
|
Additional reference words: 1.50 2.50 grayed move prev first exception
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |