Sql-server – Some rows giving “String or binary data would be truncated” error when editing in Management Studio

sql serversql-server-2005ssms

When trying to add data to a newly created column using SQL Server Management Studio (edit rows), I am getting the following error:

No row was updated.

The data in row 1 was not committed.

Error Source: .Net SqlClient Data Provider.

Error Message: String or
binary data would be truncated.

The statement has been terminated.

Correct the errors and retry or press
ESC to cancel the change(s).

The datatype for the column is nvarchar(150).


UPDATE:
I am inserting only a few ascii characters (example: abc).

This is someone else's database who asked me to look into it… I discovered:
a) only some of the rows give this error
b) the rows giving this error have long strings in two other columns (one is a nvarchar(max), and one is ntext).

Best Answer

I've experienced this on occasions when a table had a mixture of ntext and nvarchar(MAX) datatypes. Changing all the ntexts to nvarchar(MAX)s fixes the problem.