Hi
I wrote this function and now its always returning true...
can anybody help me?
Create FUNCTION dbo.ValidateCenter
(
@Center_ID nvarchar(50),
@Password nvarchar(50)
)
RETURNS bit
AS
BEGIN
declare @Res bit
if exists(Select * From TPasswords Where (Center_ID = @Center_ID) and (isSecurity = 0) and (Pass = @Password))
set @Res = 1
else
set @Res = 0
RETURN @Res
END
and i'm callign like so:
bool isValidCenter = taQueries.ValidateCenter(IDCenter, PasswordTextBox.Text) ?? false;