I am trying to execute the following stored procedure
ALTER PROCEDURE [dbo].[sp_zJDEAB_SSID_Update]
(@BuyerNo INT, @SSCustID INT, @ReturnText VARCHAR(10) OUT)
AS
SET NOCOUNT ON
BEGIN TRY
UPDATE [dbo].[crp_F0101]
SET [ABURRF] = CAST(@SSCustID AS CHAR(15))
WHERE ABAN8 = @BuyerNo
SELECT
@ReturnText = CASE
WHEN CAST(ab.ABURRF AS INT) = @SSCUSTID
THEN 'Updated'
ELSE 'Update failed'
END
FROM
dbo.crp_F0101 ab
WHERE
ABAN8 = @BuyerNo
END TRY
BEGIN CATCH
SELECT @ReturnText = 'sp Error'
END CATCH
from the following SSRS function:
Public Shared Dim UpdateText as String
Public Function UpdateF0101(JDEBuyerABNo as Integer, SSCustID as Integer) as String
If (JDEBuyerABNo>0 and SSCustID>0)
then
sp_zJDEAB_SSID_Update(Fields!JDE_BuyerABNo.Value, Fields!SS_CustID.Value, UpdateText output)
Else UpdateText = "No"
End If
Return UpdateText
End Function
I have tried several different format but the call to my stored procedure always results in a custom code error BC30451 (not declared).
What is the correct syntax for call a stored procedure that exists in the same database as the data pull for the report's grid?