##RD Tag

The ##RD tag is used to define return values from the procedure. Return values are generally numeric in nature, but when dynamic values are defined (either as a result of @@IDENTITY or similar, or column data), the parameter name will be displayed.

Since the ##RD is not legal SQL syntax, it must appear between comment tags. The tag may be between multiline comment tags (/* ... */), but only the first line will be read. If the ##RD line is intended to be a multiline comment, a ##RD must appear on the line immediately before the text to form part of the comment.

The values returned from the ##RD tag can be overridden with the ##OV tag.

If a non-numerical value is found, the parser will attempt to determine its meaning.  Thus you can define help for return values of @@IDENTITY.

Syntax

-- ##RD Value ^^ Comment

Where Value is the value returned from the procedure,
and
Comment is the documentation text to use

Example

-- ##RD 0 ^^ Procedure executed with no errors
-- ##RD -1 ^^ Procedure was not able to update the sales table.

Sample Output

This sample illustrates a procedure with three numeric return values.  With the documentation provided, the consumer of the procedure can develop their application accordingly.

© 2001-2004 Pikauba Software. All rights reserved.