?
Solved

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

Posted on 2007-11-20
7
Medium Priority
?
2,201 Views
Last Modified: 2008-02-01
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

0
Comment
Question by:jeresimpson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 600 total points
ID: 20321420
is this SQL Server 2005 ? in such case replace the 'text' datatype with  'VACHAR(MAX)
0
 

Author Comment

by:jeresimpson
ID: 20321906
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
 

Author Comment

by:jeresimpson
ID: 20321912
And yes it is SQL Server 2005.

Thanks for your help aneeshattingal
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 25

Expert Comment

by:imitchie
ID: 20322419
you probably have a trigger on that table that is comparing it to some other table. can you check?
0
 

Author Comment

by:jeresimpson
ID: 20322679
imitchie:

No triggers.

Thanks
0
 
LVL 25

Accepted Solution

by:
imitchie earned 400 total points
ID: 20323025
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
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 600 total points
ID: 20324999
SELECT table_name, column_name FROM information_schema.columns
where data_type = 'text'
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question