Ms Access and SQL Server nvarchar(max) limited to 4000 characters

1.3k Views Asked by At

I have an Access 2010 application which has a table linked to SQL Server 2014. I have a table Messages which has a couple of columns, one of which is of type nvarchar(max).

When trying to save a text with a length over 4000 characters to that column through MS Access form, it causes an error (runtime error 3146, ODBC--Call Failed).

However, when I insert a text of 4000+ characters into that column through T-SQL in SQL Server, it works without a problem. I have tried varchar(max), nvarchar(max) and still have the same issue.

1

There are 1 best solutions below

0
Alaeddin Dhahri On

varchar(X) would do the trick. I'm not sure why would varchar(max) be limited to 4000 characters.