PRB: ODBC Reserved Word in a RFX Function Causes Syntax ErrorLast reviewed: July 10, 1997Article ID: Q125226 |
1.50 1.51 | 2.00
WINDOWS | WINDOWS NTkbprg kbprb The information in this article applies to:
The Microsoft Foundation Classes (MFC), included with: - Microsoft Visual C++ for Windows, versions 1.5, 1.51 - Microsoft Visual C++, 32-bit Edition, version 2.0
SYMPTOMSAn attempt to update a data source produces a command failed message box and MFC Trace output:
Syntax error in UPDATE statement. State:37000,Native:-3503,Origin: [Microsoft][ODBC Microsoft Access 2.0 Driver] CAUSEUsing an ODBC reserved word as the second parameter (char* szName) in an RFX function causes the syntax error. The parameter represents the table's column name. For example, the following code causes the error:
void CMyRecordset::DoFieldExchange(CFieldExchange *pFX){ ...
RFX_Date(pFX, "date", ...); // error "date" is ODBC reserved word!... } NOTE: Another scenario that will cause a similar error is caused by using a reserved Access word for a table name, then trying to insert the table via MFC and ODBC.
RESOLUTIONImplement one of the following solutions:
MORE INFORMATIONFor a list of ODBC reserved words, see Appendix C of the ODBC Programmer's Reference.
|
Additional reference words: 1.50 2.00 2.50 2.51 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |