SQL Error The data types varchar and text are incompatible in the equal to operator

I have a Flex Application that calls a CFC with a SQL Insert Statement that continuously returns a SQL Server Error of : The data types varchar and text are incompatible in the equal to operator."

The SQL statement I am getting an error with is attached.

I oddly enough am having no trouble with my update statement.  

I am new to using SQL Server so I am sure it is just some rookie mistake. Thanks in advance.

Jere

insert into dbo.SiteTypes(SiteType)
				values (
					'test' 
				)

Open in new window

jeresimpsonAsked:
Who is Participating?
 
imitchieConnect With a Mentor Commented:
it's quite impossible for the SQL statement
insert into dbo.SiteTypes(SiteType) values ('test')
on it's own to generate an error of type
"The data types varchar and text are incompatible in the equal to operator."
something else is happening, maybe you can trace the sql server?
0
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
is this SQL Server 2005 ? in such case replace the 'text' datatype with  'VACHAR(MAX)
0
 
jeresimpsonAuthor Commented:
The current datatype of the field SiteType was varchar(50)  I changed it to varchar(MAX) and now I still get the same error, it just now says varchar(max) instead.
ERROR:
The data types varchar(max) and text are incompatible in the equal to operator.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
jeresimpsonAuthor Commented:
And yes it is SQL Server 2005.

Thanks for your help aneeshattingal
0
 
imitchieCommented:
you probably have a trigger on that table that is comparing it to some other table. can you check?
0
 
jeresimpsonAuthor Commented:
imitchie:

No triggers.

Thanks
0
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
SELECT table_name, column_name FROM information_schema.columns
where data_type = 'text'
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.