Tuesday, February 08, 2011

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

When adding XML to an XML field in SQL server via Linq to SQL it all works fine, however when you try and update this XML field, you get this error;

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

Fix to my solution was to edit the dbml and set the updatecheck to false

<column canbenull="true" dbtype="Xml" name="OrderXML" type="System.Xml.Linq.XElement" updatecheck="Never"></column>


Works like a dream now.

2 comments:

Anonymous said...

Hi,

your Post solve my problem

Thank you

Cindy said...

Thanks. This worked for me too.