uComponents xPath checkboxlist - String or binary data would be truncated
I hope this is the right place to ask. I have a uComponents xPath checkboxlist that gives me an error when i check 19 or more checkboxes. Up until then it saves fine.
I guess the database field is set to only hold a certain amount of characters and it gives me this error when the string exceeds this length.
Do I need to change the datatype in the database and how do I do this? Any other suggestions?
The complete error is below:
Server Error in '/' Application.
String or binary data would be truncated. The statement has been terminated.
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.Data.SqlClient.SqlException: String or binary data would be truncated. The statement has been terminated.
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Prior to v3.0, we used Nvarchar for the data-type, which we found out there was a limited number of characters - so if you are using XML format, then those characters run out fast!
We fixed this in v3.0, but there's a catch, if you swap between Nvarchar and Ntext, the content/data will not be swapped over, so you'd need to re-input your content.
No need to re-create the data-types. The upgraded uComponents will be used in your existing data-types.
The only side-effect of upgrading packages (and this applies to all Umbraco packages, not just uComponents), is that in the "Installed Packages" menu, you'll see duplicates. :-$
uComponents xPath checkboxlist - String or binary data would be truncated
I hope this is the right place to ask.
I have a uComponents xPath checkboxlist that gives me an error when i check 19 or more checkboxes.
Up until then it saves fine.
I guess the database field is set to only hold a certain amount of characters and it gives me this error when the string exceeds this length.
Do I need to change the datatype in the database and how do I do this?
Any other suggestions?
The complete error is below:
Server Error in '/' Application.
String or binary data would be truncated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.The statement has been terminated.
Exception Details: System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Hi Jess,
Which version of uComponents are you using?
Prior to v3.0, we used Nvarchar for the data-type, which we found out there was a limited number of characters - so if you are using XML format, then those characters run out fast!
We fixed this in v3.0, but there's a catch, if you swap between Nvarchar and Ntext, the content/data will not be swapped over, so you'd need to re-input your content.
If you are comfortable with SQL queries, I do have a way to move your existing data over from the Nvarchar column to Ntext, see this topic: http://our.umbraco.org/forum/using/ui-questions/21702-Switch-dbType-from-Nvarchar-to-Ntext-without-data-loss
Cheers, Lee.
Thanks Lee.
I just installed v. 3.0 and it created another instance of uComponents.
Will I need to create all my custom datatypes again?
or
Where do I swap to Ntext and still use v. 2.1?
/J
Hi Jess,
No need to re-create the data-types. The upgraded uComponents will be used in your existing data-types.
The only side-effect of upgrading packages (and this applies to all Umbraco packages, not just uComponents), is that in the "Installed Packages" menu, you'll see duplicates. :-$
Cheers, Lee.
But I still get the error when trying to save my xPath checkboxlist.
/J
Hi Jess,
Just double-checking, in the settings for the data-type, have you set the "Database Type" dropdown to use "Ntext"?
Thanks, Lee.
Thanks, that's the one I couldn't find :o)
I thought it was a setting in some config file or something.
Thanks alot.
/J
Happy to help.
Cheers, Lee.
is working on a reply...