Purpose

 Violation for quality rule 'Avoid Stored Procedures not returning a status value' seems to be not correct

Applicable in CAST Version
Release
Yes/No
8.3.x(tick) 
Applicable RDBMS
RDBMS
Yes/No
CSS(tick)
Details

The issue is that the last parameter is of Output type, hence, no status value could be returned for the stored procedures.

But for this rule we look for explicit return values (as not returning a status value can lead to data corruption and incorrect behavior). Using parameter type as OUTPUT to return values to the caller of the procedure is a valid scenario too. However,

  • the text, ntext, and image parameters cannot be used as OUTPUT parameters, unless the procedure is a CLR procedure.
  • An output parameter can be a cursor placeholder, unless the procedure is a CLR procedure.
  • A table-value data type cannot be specified as an OUTPUT parameter of a procedure. 
Notes/comments