I'm obviously reluctant to tweak the database.. unless absolutely necessary..
I'm running 7.7.6 and i can't see any obvious reason why i can't save the string
Have you tried catching the specific error and then outputting the value of xyz to a console so you can view it's actual length? That would be my first step to see if it is working in some situations but not others. Also to identify the length that is triggering the error.
After much fiddling and and so forth. someone had stuffed up strings and I was pointing to a different umbraco instance with out the correct fields etc.. ie metaKeywords instead of KeyWords
String or binary data would be truncated: for textArea
I have a function to help my editors publsh keywords based n existing child content:
However what ever I do i end up hitting a String or binary data would be truncated...
I am getting a Node
populating the properties for the IContent node
Yes I tries it as dContent.SetValue("supplierKeyWords") and then trying to pubilsh the updated value
and I get a error: String or binary data would be truncated it looks related to this error: but I've tried it with textArea, textbox and tags https://our.umbraco.com/forum/core/general/40332-Unable-to-publish-String-or-binary-data-would-be-truncated
I'm obviously reluctant to tweak the database.. unless absolutely necessary.. I'm running 7.7.6 and i can't see any obvious reason why i can't save the string
Ravi
Ravi,
Have you tried catching the specific error and then outputting the value of
xyz
to a console so you can view it's actual length? That would be my first step to see if it is working in some situations but not others. Also to identify the length that is triggering the error.Cheers
Nik
so when I do a watch:
xyz has a value of "Dallas, US, UnitedStates Of America, Jacksonville, Tampa, Orlando" I just trying to see what is wrong with the data datatype..
I keep seeing it has an id of 0 in the properties..
almost like its not there..
What values do the other properties have as ID values? Are they populating correctly?
I certainly don't profess to understanding much Umbraco coding (I'm a DB man), but last time I saw this error it was related to this issue:
https://our.umbraco.com/forum/core/general/40332-Unable-to-publish-String-or-binary-data-would-be-truncated
Running this on my DB resolved it: ALTER TABLE dbo.cmsPropertyData ALTER COLUMN dataNvarchar nvarchar(max)
Whether that's a good/best approach I'm really not sure!
Steve
I'm trying to do that as a last resort..I don't like the idea of db changes if i can avoid them.
Thanks
After much fiddling and and so forth. someone had stuffed up strings and I was pointing to a different umbraco instance with out the correct fields etc.. ie metaKeywords instead of KeyWords
is working on a reply...