This is a migrated thread and some comments may be shown as answers.

Notice - insert with not nullable nvarchar(max)

1 Answer 108 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Exi
Top achievements
Rank 2
Exi asked on 24 Jun 2009, 10:45 AM
Hi,

i have a class which contains reference on nvarchar(max) column, which is not nullable and have it's default value ''. When i create new instance of the class and initializing this field to empty string, after adding it to scope sql server (2008) throws an exception:

SqlCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size. 


I tried to chenge definitions in App.config setting size of this column to great value or zero and playing with it's db types, but with no results.

I think, that this is not really an error, because setting column definition to null and excluding initializing of this nvarchar(max) field solves the problem.

Have a nice time

Exi

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander
Telerik team
answered on 26 Jun 2009, 07:45 AM
Hi Exi,

Indeed this was a problem, but recently we made a few fixes in the empty string handling mechanism. You can upgrade to the latest internal build (2009.01.0605.1) or wait for the official 2009 Q2 release which is coming in maximum two weeks. The fix allows you to initialize and store the empty string value properly.

Sincerely yours,
Alexander
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Exi
Top achievements
Rank 2
Answers by
Alexander
Telerik team
Share this question
or