-1

I trying to write to a database, I have it connected, but I keep getting this

Error: SqlException: String or binary data would be truncated.

What is causing it and How do I fix it so I can write to the database?

1
  • It means, your length of data or string larger than the length which has been defined in a table, inside the database. Commented Aug 23, 2017 at 0:09

1 Answer 1

1

It sounds like the data you are trying to commit to the database is larger than the allocated size for that field. As an example, you are trying to commit 50 characters to a field but the field is only allocated 10 characters. Check the data you are commiting and the size allocation of the field in the database.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank You, that was my problem
No problem. Happy to help

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.