Solved

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

Posted on 2007-11-20
7
2,195 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 150 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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 100 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 150 total points
ID: 20324999
SELECT table_name, column_name FROM information_schema.columns
where data_type = 'text'
0

Featured Post

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Encryption question 2 66
MS SQL page split per second is high 19 124
How to query LOCK_ESCALATION 4 42
Update a summary table with values from detail records 6 36
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

696 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