String or binary data would be truncated

  • I need to be able to update html in a ntext field. Even if I simply edit a word, I get the "No row was updated, the data in row x was not committed, error source: .Net SqlClient Data Provider, error message: string or binary data would be truncated, the statement has been terminated".

    The text I am trying to replace the orginal with is often shorter than the existing text. This is driving me crazy! Please help!

    Thanks in advance

  • It would be helpful if you posted the code, schema, and some sample data that combine to cause the issue. The only help you could get based on the information provided would be a totally wild-guess like what I am about to do (see the links in my signature for some tips on how to get a better answer).

    If you are using ADO.NET parameters for sending the data to the database are you using the correct database type or are you using a varchar type. An ntext column is unlimited so you should not get any truncation regardless.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply