Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Receieving Error Messages In Stored Procedures

Status
Not open for further replies.

Liam1

Programmer
Nov 7, 2002
43
GB
Hello,

I know who to return an error code from within a stored procedure, using SQLCODE. Is there a way to get the full corresponding error message back too?
i.e. Table_1 does not exist
I have tried SQLERRM, but this is not recognised.

Do I have to write my own, or am I missing something?

Thanks in advance,

Liam.
 
select * from dbc.errormsgs
where errorcode = :sqlcode;

will return the message template, but the actual table name is missing:
"Object '%VSTR' does not exist"

Dieter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top