BUG: ClassWizard "Bind", "Update Columns" Buttons Disabled.

Last reviewed: July 24, 1997
Article ID: Q118875

The information in this article applies to:
  • The Microsoft Foundation Classes (MFC) included with: - Microsoft Visual C++ for Windows, versions 1.0, 1.5 - Microsoft Visual C++, 32-bit Edition, versions 1.0, 2.0, 4.0,

         4.1, 4.2
    

SYMPTOMS

In ClassWizard, choose the Add Class command button. From the Add Class dialog box, select the Import Class command button. In the Import Class dialog box, type the name of a CRecordset-derived class that you would like to import, specifying the header and implementation files from which to import.

ClassWizard then imports the class so that you can see object IDs and members, but so that you are not able to bind variables ("Bind All") or update column information ("Update Columns") from the "Member Variables" tab; this is because ClassWizard is not aware that the CRecordset-derived class is associated with a database.

CAUSE

ClassWizard does not copy the database information from the .CLW file associated with the imported class. That file contains a "DB" section that tells ClassWizard to look for data source information. If the DB section is missing, ClassWizard does not enable the Bind All and Update Columns command buttons.

RESOLUTION

To work around this problem, copy the DB section from the .CLW file that is associated with the imported CRecordset-derived class to the .CLW file of the current project. For the Enroll sample, the section should look like this:

   [DB:CSectionSet]
   DB=1
   ColumnCount=6
   Column1=CourseID,1,8,1
   Column2=SectionNo,1,4,1
   Column3=InstructorID,1,8,1
   Column4=RoomNo,1,10,1
   Column5=Schedule,1,24,1
   Column6=Capacity,5,2,1

The DB section for the imported CRecordset-derived class contains the "DB=1" line as shown and column count and name lines reflecting the correct values for that class.

STATUS

Microsoft has confirmed this to be a bug in the products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: crecordset import add
Keywords : kbprg MfcDatabase vcbuglist400 kbbuglist
Technology : kbMfc
Version : 1.0 1.5 2.0 4.0 4.1
Platform : NT WINDOWS
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 24, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.