I use nhibernate to store some user preferences for an application in a SQL Server Compact Edition table.
This is a fragment of a mapping file:
<property name="Name" type="string" /> <property name="Value" type="string" />
The name is the regular string / nvarchar (50), and the value is set as ntext to DB
I am trying to write a lot of xml for the Value property. I get an exception every time:
@p1 : String truncation: max=4000, len=35287, value='<lots of xml..../>'
I worked a bit with it and tried several different matching configurations:
<property name="Name" type="string" /> <property name="Value" type="string" > <column name="Value" sql-type="StringClob" /> </property>
This example. Other configurations include "ntext" instead of "StringClob". Those configurations that do not throw an exception to display still throw a line break exception.
Is this a problem ("function") with SQL CE? Is it possible to place more than 4000 characters in a SQL CE database using nhibernate? If so, can someone tell me how?
Thank you very much!
source share