Manyusers build an application using MS SQL SERVER 2005 as backend. Since SQL Server 2005 is case insensitive even if user gives a lowercase password instead of a upper case one (if original password is in Upper case), the system allows to login. Solution for that is:
select @Result=login_id from Tbl_logindetails where login_name=@login_name and password=@password COLLATE SQL_Latin1_General_Cp1_CS_AS
By the Way, you shouldn't store plain text passwords in the database.. :)
select @Result=login_id from Tbl_logindetails where login_name=@login_name and password=@password COLLATE SQL_Latin1_General_Cp1_CS_AS
By the Way, you shouldn't store plain text passwords in the database.. :)
No comments:
Post a Comment