title: Display data with stored procedure
body: <p>I have the following stored procedure.. </p>
  
  <pre><code>CREATE PROCEDURE USP_COM_MST_DEL(
      @Code AS INT = 0,
      @Name AS VARCHAR(50)= '',
      @Type AS INT =0,
      @Operation AS varchar(20) ='',
      @Message AS VARCHAR(200) OUTPUT,
      @Status AS VARCHAR(2) OUTPUT
  )
  AS
  BEGIN
      IF(@Operation = 'DISPLAY')
      BEGIN
          IF NOT EXISTS (SELECT * FROM COM_MST WHERE COM_CTCD = @Type)
          BEGIN
              SET @Status = '0'
              SET @Message = 'NO RECORD FOUND'
          END
          ELSE
          BEGIN 
              SET @Status = '0'
              SET @Message = 'NO RECORD FOUND'
              SELECT * FROM COM_MST WHERE COM_CTCD = @Type
          END
      END
  END
  </code></pre>
  
  <p>But when I try to run the procedure.. it shows an error</p>
  
  <pre><code>USP_COM_MST_DEL @Operation = 'DISPLAY'
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Procedure or function 'USP_COM_MST_DEL' expects parameter '@Message', which was not supplied.</p>
  </blockquote>