Forum Topic

Viewing a single forum discussion topic.

Back to Programming Errors And Help

string or binary data would be truncated when trying to insert

Post a reply
2027 views
DeepikaPatil
DeepikaPatil

While insert data through insert query I got this error anyone have solution for this error?

mayureshpandit282
mayureshpandit282

Whenever you see the message....

string or binary data would be truncated

Think to yourself... The field is NOT big enough to hold my data.

Check the table structure for the table where you try to insert it. 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 Phone field is a varchar(8) field, and you try to put 11 characters into it, you will get this error.

DeepikaPatil
DeepikaPatil

Thank You so much. It works for me. I am increasing the size of my field and my insert query is executed successfully.

1-3 of 3

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.