Reputation: 13
I am running this stored procedure and I need it to return a string value of
Success
or
Failed
But the following procedure is missing something, not sure what?
ALTER PROCEDURE [dbo].[sp_Log_Audit]
(
@username varchar(254) = NULL,
@password varchar(254) = NULL,
@User_ID int = NULL,
@Method varchar(10) = NULL,
@Result varchar(10) = Failed
)
AS
SET NOCOUNT ON;
INSERT INTO dbo.[A_Logins]([Username], [Password], [User_ID], [Method], [Result])
VALUES(@userName, @Password, @User_ID, @Method, @Result)
SET NOCOUNT OFF;
RETURN
It should return @Result
as it will be having a Success
or Failed
message
Upvotes: 1
Views: 59
Reputation: 3716
I think you haven't return any value, can you try this at the place of where you wrote return?
SELECT @Result As ReturnVal
Upvotes: 1