Microsoft KB Archive/109341: Difference between revisions
m (Text replacement - "<" to "<") |
m (Text replacement - ">" to ">") |
||
Line 57: | Line 57: | ||
<div class="errormessage"> | <div class="errormessage"> | ||
[Microsoft][ODBC SQL Server Driver][SQL Server] Incorrect syntax near the keyword '<keyword | [Microsoft][ODBC SQL Server Driver][SQL Server] Incorrect syntax near the keyword '<keyword>'. (#156) | ||
</div> | </div> | ||
Line 94: | Line 94: | ||
# Save the table with the name Test Table. | # Save the table with the name Test Table. | ||
# From the File menu, choose Export. | # From the File menu, choose Export. | ||
# In the Data Destination box select <SQL Database | # In the Data Destination box select <SQL Database>, and then choose OK. | ||
# In the Select Microsoft Access Object box, choose Test Table. Choose OK. | # In the Select Microsoft Access Object box, choose Test Table. Choose OK. | ||
# In the Export dialog box, choose OK. | # In the Export dialog box, choose OK. |
Latest revision as of 17:45, 20 July 2020
Article ID: 109341
Article Last Modified on 5/6/2003
APPLIES TO
- Microsoft Access 1.0 Standard Edition
- Microsoft Access 1.1 Standard Edition
- Microsoft Access 2.0 Standard Edition
This article was previously published under Q109341
SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.
You receive the error message "ODBC - Call failed" when you export a Microsoft Access table to a SQL Server database using ODBC if the table field names are SQL reserved words. This error message is followed by another which reads:
CAUSE
This problem will occur if the table you are exporting contains a field name that is also an SQL keyword. The Microsoft ODBC driver for SQL Server translates the export command into an SQL statement that can be interpreted by the SQL Server. If a field name in the Microsoft Access table is an SQL keyword, the SQL Server will interpret the field name as an SQL command keyword.
RESOLUTION
Rename the fields in the Microsoft Access table to non-SQL reserved words. Field names such as Order, In, From, or Where should not be used when you create Microsoft Access tables.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access version 7.0.
MORE INFORMATION
Steps to Reproduce Problem
- Create a new table with a field named Order.
- Save the table with the name Test Table.
- From the File menu, choose Export.
- In the Data Destination box select <SQL Database>, and then choose OK.
- In the Select Microsoft Access Object box, choose Test Table. Choose OK.
- In the Export dialog box, choose OK.
- In the SQL Data Sources dialog box, select a SQL Server. Choose OK.
- If necessary, log on to the SQL Server using the SQL Server Login dialog box.
The error messages stated above will be displayed.
Keywords: kbbug kbusage KB109341