Microsoft KB Archive/168044

= FIX: ClassWizard May Fail to Derive a Class from CRecordset =

Article ID: 168044

Article Last Modified on 12/10/2003

-

APPLIES TO


 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition

-



This article was previously published under Q168044



SYMPTOMS
When deriving a class from CRecordset, ClassWizard may send the following error message:

The file names ( MyFile.h, MyFile.cpp) for the class "CMyFile" do not exist or are invalid file names.



CAUSE
This problem occurs if the current directory is changed sometime during the derivation process. For example, if you are using a DSN for an Access data source, but you haven't specified the path to the MDB file. This causes a dialog box to appear so that you can navigate to the MDB file. When the dialog box is closed, the current directory is not reset to the project directory. The .h and .cpp files are created in the current directory, where the MDB file is located.



RESOLUTION
Use a DSN that consists of a qualified path to the database file or directory.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This problem was corrected in Microsoft Visual C++ .NET.

Additional query words: kbVC500bug kbVC600bug kbmfc kbdatabase kbodbc kbwizard kbtools

Keywords: kberrmsg kbbug kbfix kbnoupdate KB168044

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.