0 Replies Latest reply on Jan 9, 2018 5:12 PM by dnovak

    MS SQL - Custom Procedure Alert - Single Numeric - Return Value Null?

    dnovak

      I have been attempting to return a result to an alert via a MS SQL stored procedure call, however I am getting the following error:

      Alert returned the value [null] which is not of the expected type [Number]

       

      Here is my sample setup:

      TEST Stored Procedure:

      ALTER PROCEDURE THWACKTEST

       

            @#ALERTVALUE# nvarchar(15) OUTPUT --If I change this to an Int I get the following error from DPA - Error converting data type varchar to int.

      AS

      BEGIN

            select @#ALERTVALUE# = 5;

      END

      GO

       

      TEST SQL CALL:

      DECLARE @#ALERTVALUE# int

       

      EXEC [dbo].[THWACKTEST] @#ALERTVALUE# OUTPUT

      select @#ALERTVALUE#

      (This returns the expected result of 5)

       

      TEST CALL FROM DPA:

      [TRCI].[dbo].[THWACKTEST](@#ALERTVALUE# OUTPUT)

       

      Results from DPA:

      Alert returned the value [null] which is not of the expected type [Number]

       

      I believe I have tried every iteration of this I can think of, if someone has a working example of using the #ALERTVALUE# output in DPA I would love to see it. Thank you in advance!