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
Sivakumar
NA
551
219.6k
Encrypted password is not saving in table column
Sep 29 2015 3:23 AM
Hi,
This is my stored procedure :
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[uspAddMember]
@MemberName NVARCHAR(50),
@LoginName NVARCHAR(50),
@LoginPassword NVARCHAR(4000)
AS BEGIN
DECLARE @HashThis nvarchar(4000);
SET @HashThis = CONVERT(nvarchar(4000),@LoginPassword);
SELECT HASHBYTES('SHA2_256', @HashThis);
DECLARE @MemberID INT;
INSERT INTO Member(MemberName, LoginPassword)
VALUES(@MemberName, @HashThis);
SET @MemberID = SCOPE_IDENTITY();
INSERT INTO MemberLogin(MemberID, MemberLoginName)
VALUES(@MemberID, @LoginName);
RETURN @MemberID;
END
when I execute this procedure generate a encrypted password but not saving in table column.
Please give me a correct query for that.
Thank you.
Reply
Answers (
17
)
error while connecting to sql server
SQL database