Creating a Stored Procedure Success Message

When setting up a custom button that triggers a stored procedure, you can set up the stored procedure to return a success or failure message without raising an exception from the stored procedure, triggering a stack trace error.

The steps below outline the process.

Note: This is only an outline. These steps do not give a detailed description of the process and assume that you know how to write stored procedures and launch them using a custom button.
  1. Add a parameter to a stored procedure named @ReturnMessage that is an output parameter.
  2. Code the stored procedure to set the return message. If the message should not display, set it up as an empty string.
  3. Code the stored procedure to return an integer to determine whether the message is a success message (0) or failure message (any number greater than 0).
  4. When setting up the custom button in the VA Custom Form Buttons form, add the return message parameter to the Parameters tab.