I have a legacy database that I am writing a new interface for. This database has several tables that use the column name "Print". I cannot change the name of the column in the database. I need to be able to update and insert new data in these tables using the reserved word as a column name. I have tried putting [] around the name in the SQL select and this will allow me to retrieve data, but when I go to try to insert a new record and then update, I get a sql error.
SQLSTATE = 37000
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'print'.
No changes made to database.
Anyone know any tricks to get around this issue?
Thanks
Rick
Normally, I hate this option, but in YOUR case you can check this option, then regenerate.
Your code will now look like "table_1"."column_A", and that should allow you to process those columns using reserved words as their column names.
If you only have one column in one table that uses a reserved word as it's column name, then this solution is overkill.