Search code examples
.netlinq-to-sql

Linq to SQL error SQL does not compare NText, Text, Xml, or Image?


When trying to do an update for a Linq object I receive the following error.

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

There is a field in the database that is a Text field because it is going to hold a string that could be as much as 32kb.

Should I change the data type or is there a work around in Linq I could use?

EDIT

I have support SQL 2000 which is why it is a TEXT field.


Solution

  • Change it to a VARCHAR(max) - it will make life much easier.


    EDIT

    Full text indexing may help you here, not sure if SQL 2000 would allow you to then "search" on your text column