Microsoft KB Archive/147735

= FIX: ClassWizard Quits If Class Twice Derived from CRecord =

Article ID: 147735

Article Last Modified on 11/21/2006

-

APPLIES TO

 Microsoft Foundation Class Library 4.2, when used with:  Microsoft Visual C++ 4.0 Professional Edition

 Microsoft Visual C++ 4.1 Subscription

 Microsoft Visual C++ 5.0 Learning Edition 

-

<div class="notice_section">

This article was previously published under Q147735

<div class="symptoms_section">

SYMPTOMS
Under circumstances similar to the following, ClassWizard may cause an access violation:
 * You derive a class, CMyRecordset1, from CRecordset using ClassWizard.
 * You derive another class, CMyRecordset2, from CRecordset using ClassWizard.
 * You replace all occurrences of CRecordset in the .cpp and .h files for CMyRecordset2 with CMyRecordset1

The result is that CRecordset2 will be derived from CRecordset1. When ClassWizard is invoked to view CMyRecordset2, an access violation may occur. This problem has been verified with both CRecordset and CDaoRecordset.

<div class="resolution_section">

RESOLUTION
Leave occurrences of CRecordset in the ClassWizard comments. Particularly, don't change: //{{AFX_FIELD(CRecordset2, CRecordset) to: //{{AFX_FIELD(CRecordset2, CRecordset1)

<div class="status_section">

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 Visual C++, 32-bit Edition, version 4.2.

Keywords: kbbug kbfix kbnoupdate kbvc420fix kbwizard KB147735

-

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

© Microsoft Corporation. All rights reserved.