Thursday 11 August 2011

SQL Server does not handle comparison of NText, Text, Xml, or Imagedata types.

When insert XML to an XML field in SQL server via Linq to SQL it all works fine, But  when you try  to update this XML field using LINQ, you will  get this exception:
System.NotSupportedException: SQL Server does not handle comparison of NText, Text, Xml, or Image data types
Inorder to fix this issue just open the dbml file with xml editor and set the updatecheck to false as follows:
<column canbenull="true" dbtype="Xml" name="PermissionsXml" type="System.Xml.Linq.XElement" updatecheck="Never"></column>

No comments:

Post a Comment