BUG: OLE DB AppWizard Generates Wrong SQL Statement (190942)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q190942 SYMPTOMS
If an Oracle table name contains spaces in it, the MFC OLE DB AppWizard
will generate incorrect SQL Statements. This problem happens when using
either the OLE DB Provider for ODBC (using the Microsoft Oracle ODBC
Driver) or the OLE DB Provider for Oracle.
When attempting to build the application, the following error is returned:
error C2017: illegal escape sequence
RESOLUTION
The solution is to remove one of the slashes from each part of the SQL
Statement. The SQL Statement should resemble the following:
"SELECT * FROM PSS.\"my table\""
Although this corrects the SELECT statement, the COLUMN_MAP and Data
members for the CMytable class are not created, because of the original
syntax problem. The datamembers and COLUMN_MAPs must be manually created. A
better solution would be to not use spaces in table names.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft 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.
Modification Type: | Major | Last Reviewed: | 11/18/2003 |
---|
Keywords: | kbBug kbDatabase kbOracle kbpending KB190942 |
---|
|