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