troubleshooting Question

MS SQL request INSERT with out use convert

Avatar of thierry91
thierry91 asked on
Microsoft SQL Server 2005
4 Comments3 Solutions300 ViewsLast Modified:
my INSERT is :

INSERT INTO [SurfControl_WebFilter].[dbo].[_WhereObjList_A] ([Object_ID],[Attrib_Name],[Type],[Attrib_Val_S],[Attrib_Val_N],[Attrib_Val_B]) VALUES
(
'1, int,'
,'Member, varchar(40),'
,'0, int,','ScoutMonitored\Monitored Sites\www.superu-laiz.com, varchar(250),'
,'NULL, int,'
,'NULL, varbinary(255),'
)



table WebFilter is :

CREATE TABLE [dbo].[_WhereObjList_A](
      [Object_ID] [int] NULL,
      [Attrib_Name] [varchar](40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
      [Type] [int] NULL,
      [Attrib_Val_S] [varchar](250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
      [Attrib_Val_N] [int] NULL,
      [Attrib_Val_B] [varbinary](255) NULL
) ON [PRIMARY]

When I whant insert I have ERROR :

Msg 257, Level 16, State 3, Line 1
Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query.

I not want use CONVERT.

where is my error in my request INSERT ?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 3 Answers and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros