Asked by:
Error, "The data types text and nvarchar are incompatible in the equal to operator"

Question
-
User1065735002 posted
Hi, i have a table in sqlexpress named Contacts:
ID (int) -primary key-
name (varchar(30))
lastname (varchar(30))
phone (varchar(15))
fax (varchar(15))
desc (text)
In my default.aspx page, i have a GridView that has the conecction to this table. The GridView has the Editing and Deleting checkbox enabled but my problem is that i can't edit or delete any row when the page is running and the massage is this: "The data types text and nvarchar are incompatible in the equal to operator"
It would have to work, but i don't know what happen, Please, any help!
Tuesday, January 3, 2006 3:50 PM
All replies
-
User-1786411686 posted
Handling TEXT datatypes is slightly different than regular columns. You cannot do a regular UPDATE/INSERT with TEXT column. Read up BOL for more info.Tuesday, January 3, 2006 8:56 PM -
User-1225738063 posted
Change desc from text to varchar(max) and your issue should go away.Wednesday, January 4, 2006 1:48 AM -
User1065735002 posted
Ok, but what is BOL?
Wednesday, January 4, 2006 9:43 AM -
User-1225738063 posted
Books On Line (The documentation/help)Wednesday, January 4, 2006 12:46 PM -
User1065735002 posted
Thank you Motley, now i can update and delete whit that change in the data type.Thursday, January 5, 2006 10:35 AM -
User39490543 posted
Ok, but what is BOL?
Books Online is a great free SQL Server reference from Microsoft. You can download it and install it locally or you can access it online:
Downloadable verson of Books Online
Online version of Books Online
Thursday, January 5, 2006 11:26 AM -
User-319838109 posted
ok, i have the same problem!!!!!
i changed text to vchar(max).
i dont get an error any more. but the update doesnt work either!!
i am using TINYMCE to add functionality to the textbox. when i press update it does back to view mode but ignores my alterations.
if i dont use the TINYMCE editor on the text box everything works fine.
Monday, July 31, 2006 12:23 PM -
User1707861034 posted
Thanks... ! :)
Wednesday, March 5, 2008 7:30 AM