Can you please let me know how do I resolve this problem while inserting xml data into Sql Server 2008
ex = {"String or binary data would be truncated.\r\nThe statement has been terminated."}
I already replaced '
, ""
with an empty string
thanks in Advance
Please check the datetype of the column. Make sure it has enough space.
Check the Database Column Size and Data length. you will get this error when you are storing data of length greater than that of defined size.
Ex. string Data = "saving this data causes error."; int datalength = Data.Length; // will be 30 characters , greater than defined size Customer.Name = Data; //you will get error for this line if you have Name (varchar 25, null) in db .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With