What do you think , does the Stored Procedure always return 1 ?
I am concerned about the if exists(..)
BEGIN
DECLARE @IsUserExisting bit
SET NOCOUNT ON
IF Exists
(
Select null FROM G_User WHERE
SamAccountName = @SamAccountName
AND NetBIOSDomainName = @NetBIOSDomainName
)
BEGIN
SET @IsUserExisting = 1
END
ELSE
BEGIN
SET @IsUserExisting = 0
END
Select @IsUserExisting
END