Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    1

    Unanswered: PWDCOMAPRE issue with SQL Server 2005

    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.

  2. #2
    Join Date
    Apr 2007
    Posts
    183

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •