Monday 23 December 2013

SQL Error - String or binary data would be truncated

SQL Error - String or binary data would be truncated

Problem: 
Error indicates you passed a string bigger than the column in database.

Solution: 
Increase the size of your column. Or pass value within specified size.

Example:
If you have a column with datatype VARCHAR(3), and you passed a string "Test Insert" in INSERT/ other query, you get this error. So increase the size if required or pass the right value with maximum length as specified in datatype.

No comments:

Post a Comment