Avatar of javier-d
javier-d
Flag for United States of America

asked on 

String or binary data would be truncated.

We converted a SQL field from NText to NVarChar(Max), the conversion went smoothly, but recently when our programs do a record update, we began to receive the message "String or binary data would be truncated." We checked the length of the new data for this field, and it is longer than the original values but it is way smaller than the 4,000 character maximum, we think that the problem is due to the fact that the field record is located at the end of a disk page boundary, and SQL can not extend the length of the field, our solution to this was delete the record and insert a new one with the new data.

We are currently using MS-SQL 2016, the table was created in MS-SQL 2005.

We are looking for a more smooth solution or a fix to this problem.
SQLMicrosoft SQL Server

Avatar of undefined
Last Comment
javier-d

8/22/2022 - Mon