TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gaurav Raj
NA
475
86.2k
Implicit conversion from data type nvarchar to varbinary is
Mar 31 2019 2:24 AM
CREATE TABLE [dbo].[RegisterTable] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (50) NULL,
[email] NVARCHAR (50) NULL,
[HashPassword] BINARY (32) NULL,
[ActivationCode] INT NULL,
[verify] INT NULL,
[Date] DATE NULL,
[Time] TIME (7) NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);
insert into RegisterTable (Name,email,HashPassword,ActivationCode,verify)
values ('mn','
[email protected]
',(select HASHBYTES('SHA2_256','12345')),124,0)
CREATE PROCEDURE [dbo].[LoginProcedure]
@Email nvarchar(50),
@HashPass varbinary(32)
AS
SELECT name from RegisterTable
where email=@Email or HashPassword =CONVERT(varbinary(MAX), HASHBYTES('SHA2_256', @HashPass))
RETURN 0
USE [C:\USERS\RAAAZZ\DOCUMENTS\VISUAL STUDIO 2013\WEBSITES\WEBSITE1\APP_DATA\DATABASE.MDF]
GO
DECLARE @return_value Int
EXEC @return_value = [dbo].[LoginProcedure]
@Email = N'
[email protected]
',
@HashPass = N'12345'
SELECT @return_value as 'Return Value'
when i exec login procedure i got error
Implicit conversion from data type nvarchar to varbinary is not allowed. Use the CONVERT function to run this query.
how can i solve it
Reply
Answers (
2
)
I want to Dynamic TOTAL using ASP.Net C#.
Developing an Employee ASP.NET MVC Base Application