returning an error

returning an error

 

  


Hello. I have written many procedures for MSSQL and Sybase, but not many
in DB2. I am trying to figure out the best way to return an error message
to an application from a stored procedure. In MSSQL there is a
'raiserror' command. So I could say in a stored procedure..

is @var <>2
raiserror 'The var is not equal to 2'

The application would then know how to handle whatever message I sent it.
I am thinking I should just probably use RETURN, but I am not sure. What
are your thoughts?

Thanks,
Lisa Greetham
Database Administrator, Corporate Internet Group
Bank One



This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.

DB2 & UDB email list listserv db2-l LazyDBA home page