FIX: Can't Select First Table When Creating DAO Table Recordse

Last reviewed: September 18, 1997
Article ID: Q139490
The information in this article applies to:

  - Microsoft Visual C++, 32-bit Edition, version 4.0

SYMPTOMS

If you are using AppWizard or ClassWizard to create a table-type recordset derived from CDaoRecordset, you will not be able to successfully select the first table in the list of tables presented. Attempting to do so will result in a dialog box bearing the following message:

  You must select one table for this table-type recordset.

RESOLUTION

To work around this problem, follow this procedure:

  1. Instead of selecting a Table recordset type in the wizard, use Dynaset.

  2. Edit the implementation (.cpp) file of the resulting recordset and search for the member variable m_nDefaultType. Change the type of recordset by modifying the value that is assigned to that member.

    Change this:

         m_nDefaultType = dbOpenDynaset;
    

    To this:

         m_nDefaultType = dbOpenTable;
    

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ 4.1.


Additional query words: app class wizard

Keywords : MfcDAO vcbuglist400 vcfixlist410 WizardIss kbprg kbbuglist kbfixlist
Technology : kbMfc
Version : 4.0
Platform : NT WINDOWS
Issue type : kbbug
Solution Type : kbfix


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: September 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.