Forum Discussion

EzAccessGideon's avatar
EzAccessGideon
Occasional Reader
Apr 24, 2026

ODBC error (incorrect syntax) since 2604

Overnight i have the problem that many inserts in my MS Access app do not work anymore. I get the error

Run-time error '3155':

ODBC--insert on a linked table 'tablename' failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '='.(#102)

I have been able to isolate this issue on a column of type NVARCHAR(MAX). If I insert any value except null in this column the error above will show on save. I tested with other variants of NVARCHAR. The problem happens starting from NVARCHAR(256), thus what is Long Text for Ms Access. When i insert the record first with a value null for this column, no error is generated and the record is saved. If i 'Update' the record later with a text value in this column, that is no problem. 

So, the ODBC connection generates a sql insert statement that is mallformed in case of a long text.

I have this problem consistent on all apps and all tables where i have NVARCHAR(>255).

My solution is to go back to office release 2508 (semi annual support).