Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 334
David Basarab Avatar asked May 15 '09 15:05

David Basarab


1 Answers

you can always use ToString() on the string in question which will force client side comparison.

like image 157
Nick Daniels Avatar answered Oct 12 '22 02:10

Nick Daniels