Article ID: 139996 - Last Review: January 6, 2004 - Revision: 3.0 BUG: Wizards Create Invalid Column Names for QueryDef JoinThis article was previously published under Q139996 SYMPTOMS If you use AppWizard or ClassWizard to create a MFC DAO
recordset based on a predefined query (QueryDef) that joins tables that contain
columns with identical names, the application generates an exception when it
attempts to open the recordset. The exception indicates that: '[table.column]' isn't a valid parameter name. Note In Visual C++ 6.0, the AppWizard creates a CdaoRecordset-derived class for the application based on the query. At run-time, you receive the following error message: Invalid bracketing of
name '[table.column]' '' is not a valid name.
Make sure that it does not include invalid characters or punctuation and that
it is not too long. CAUSE The exception is thrown due to the incorrect manner in
which the wizards add delimiting brackets to the standard
table_name.column_name references in your CDaoRecordset-derived class's
DoFieldExchange. The wizards generate the following syntax: [table.column] [table].[column] RESOLUTION You must manually modify the DoFieldExchange of the CDaoRecordset-derived class or the CRecordset-derived class to
correct those column references that use the incorrect syntax. Follow these steps:
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
APPLIES TO
| Article Translations
|
Back to the top
