Tuesday, March 5, 2019

String or binary data would be truncated. The statement has been terminated

Hi 

If you are getting "String or binary data would be truncated. The statement has been terminated" This error from sql server in simple word  because of column size issue.

In my case, I was getting this error because my table had

varchar(20)
but I was injecting 50 character long string, which resulted in this error. Changing it to
varchar(220) As per your data size.

fixed the problem.


(Set a length on your column . Eg :- if your are using  varchar(20) increase the size of it.).


Thank you,

Arjun Walmiki



No comments:

Post a Comment