February 17, 2009 at 3:08 pm
Hello Everyone,
I am moving our database from SQL Server 2000 to SQL Server 2005 and I am facing a problem with PWDCOMPARE function. Below is the stored procedure to get the emplyoee ID based on email address and the password. It works in SQL Server 2000 but it does not work in SQL Server 2005.
ALTER PROCEDURE [dbo].[GetEmpLogin]
@Email varchar(50),
@Password varchar(16),
@EmpID bigint OUTPUT
AS
IF EXISTS (
SELECT EmpID FROM Employees WITH (NOLOCK)
WHERE Email = RTRIM(LTRIM(@Email)) AND PWDCOMPARE(@Password, Password, 0) = 1
AND Deleted IS NULL)
BEGIN
SELECT @EmpID = EmpID FROM Employees WITH (NOLOCK) WHERE Email = RTRIM(LTRIM(@Email)) AND PWDCOMPARE(@Password, Password) = 1 AND Deleted IS NULL
END
ELSE SELECT @EmpID = 0
What should I do?
Please help.
Thanks a lot.
Regards,
CK.
February 17, 2009 at 3:29 pm
PWPDCOMPARE is not a built-in function, so I would start by looking at what it actually does. Although I doubt you will be allowed to post what it does - if you did, you might get some ideas as to why it no longer works.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply