CREATE PROCEDURE [ChecaSenha] 
@btInStr VARCHAR(10),
@btInStrIndex VARCHAR(10)
AS
BEGIN 
DECLARE @btOutVal BINARY(16)
EXEC master..XP_MD5_EncodeKeyVal @btInStr, @btInStrIndex, @btOutVal OUT
SELECT memb___id,memb__pwd FROM MEMB_INFO WHERE memb___id = @btInStrIndex AND memb__pwd = @btOutVal
END