Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
I have dropped a TADOStoreProc component on my DataModule and use it as follows:
ALTER PROCEDURE [dbo].[DoesStandardUserExist] -- Add the parameters for the stored procedure here @Username nvarchar(50), @Password nvarchar(50), @UserId integer = null output AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; select @UserId = Users.Id from Users where Users.UserId = @Username and Users.Password = @Password and Users.Status = 'A' -- If the login was found then return 1. if not( @UserId is null) return 1 else return 0 ; END
BUT it appears that only the first time i execute the SP i get the correct return values. After the first successful user/password match the values of @UserID and @Return_Value are always set to the last successful match.
DoesStandardUserExist.Parameters.ParamByName('@UserName').Value := edtUserName.Text ; DoesStandardUserExist.Parameters.ParamByName('@Password').Value := edtPassword.Text ; DoesStandardUserExist.ExecProc ; if not VarIsNull( DoesStandardUserExist.Parameters.ParamByName('@UserId').Value ) then begin