views:

22

answers:

3

Can anyone point me to a list/description of standard @RETURN_VALUES in SQL Server 2005 (if such a thing exists)? I have searched multiple times and can't find any reference. Interestingly, I was debugging a stored procedure earlier today using Visual Studion 2008 and received this in the results--"@RETURN_VALUE = -6". Wondering what -6 means and where the master list for these values is.

Thank you for your help!

A: 

I don't believe there is any agreement for stored procedure return values beyond:

  • 0: success
  • > 0 : error
  • < 0 : critical error
Ken Keenan
A: 

Some (system) stored procedures are documented. And the documentation (SQL help) tells about the possible return values and their meanings. Additional to what Ken wrote there is 0 - nothing done

0 - number of XXX (sent mails, deleted entries, ...) <0 (except for comparison) is (like Ken wrote) an error

ManniAT
A: 

There is some slight logic behind "standard" codes.

I asked similar here too when I got -4

gbn