This stored procedure doesn't work. I've checked the SQL and it returns the correct value when parsed directly to the DB. It's really strange! It just returns 0 rows.
What could be wrong?
ALTER PROCEDURE dbo.GetSaltOfUser ( @eMail nvarchar ) AS DECLARE @result nvarchar /* SET NOCOUNT ON */ BEGIN SELECT @result = salt FROM UserSet WHERE eMail = @eMail RETURN @result END