Tuesday, August 11, 2015

String or binary data would be truncated

Error: String or binary data would be truncated

When you see the above error, this is related to SQL Server column data size specific error.

You might specified length of the string is less but you are passing more than what you specified.


Just you have to increase the size of the column for which ever column you are getting the error.

Check the table structure for the table which you are trying to insert. The data which you are trying to insert is more then the length which you specified for the same column. I think you'll find that the length of one or more fields is NOT big enough to hold the data you are trying to insert. For example, if the country name field is a varchar(6) field, and you try to put more than 6 characters in to it, you will get this error.

No comments:

Post a Comment