?
Solved

Error: Implicit conversion from data type varchar to varbinary is not allowed.

Posted on 2005-04-21
2
Medium Priority
?
8,395 Views
Last Modified: 2008-02-07
Hi,

Please kindly help resolve this error message.

Thanks.

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


create proc dbo.user_master_verify
@myUsername as varchar(50),
@myPassword as varchar(50)
as
DECLARE @Password VARBINARY(255)
SELECT @Password = pass
FROM user_master
WHERE Username = @myusername
RETURN pwdcompare(@mypassword, @Password )
Go

0
Comment
Question by:EdwardPeter
  • 2
2 Comments
 
LVL 10

Expert Comment

by:AustinSeven
ID: 13831698

Try the following

RETURN pwdcompare(conver@mypassword, @Password )

AustinSeven
0
 
LVL 10

Accepted Solution

by:
AustinSeven earned 2000 total points
ID: 13831703
typo...

RETURN pwdcompare(convert(varbinary, @mypassword) , @Password )

AustinSeven
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

840 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