IT Community - Software Programming, Web Development and Technical Support

Username,Password verfication in SQL Server 2005 itself using stored procedure

This is a discussion on Username,Password verfication in SQL Server 2005 itself using stored procedure within the Database Support forums, part of the Web Development category; Username and Password verification in SQL stored procedure. Goals: This stored procedure is used to verify username and password itself. ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-20-2007, 12:21 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Username,Password verfication in SQL Server 2005 itself using stored procedure

Username and Password verification in SQL stored procedure.


Goals:

This stored procedure is used to verify username and password itself.

Steps:

1) Create a stored procedure.

2) copy the following code.

CREATE PROCEDURE [trainee].[empinfologin]
(@username varchar(20), @password varchar(20), @values int output)
AS
declare @user varchar(20)
declare @pass varchar(20)
declare @result varchar(40)

BEGIN
select @user=username, @pass=password from empinfo
where username=@username and password=@password
if @user = @username and @pass = @password
begin
set @result='Success'
set @values=1
return @values
end
else
begin
select @user=username, @pass=password from empinfo where
username=@username
if @user=@username and @pass!=@password
begin
set @result='Incorrect Password'
set @values=2
return @values
end
else
SET @result='User does not exist'
set @values=3
return @values
end
END
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/database-support/2275-username-password-verfication-sql-server-2005-itself-using-stored-procedure.html
Posted By For Type Date
Username,Password verfication in SQL Server 2005 itself using ... | Web Hosting This thread Refback 01-11-2008 05:35 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can we encrypt the username and password using PHP? sundarraja PHP Programming 3 05-15-2008 07:29 AM
Username and Password verification in SQL stored procedure. oxygen Database Support 1 12-23-2007 09:43 PM
Can a stored procedure call itself or recursive stored procedure? How many level SP n H2o Database Support 1 08-03-2007 10:55 AM
How to Send Mail Using Stored Procedure in MS SQL SERVER 200x?? Gopisoft Database Support 1 07-17-2007 09:43 AM
How Can we change the logon password in SQL Server 2005 ? mobilegeek Database Support 1 07-16-2007 02:39 AM


All times are GMT -7. The time now is 09:24 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0