sobota, 29. september 2007

Description of DB2 sqlcodes

Did you ever need a description of a sqlcode in a programming language like Java? Did you ever wanted to know if an sqlcode is an error or a warning?
You can use SYSPROC.SQLERRM function for that:
VALUES(SYSPROC.SQLERRM('SQL0911N', '', '', 'en_US', 0))

There is a sqlcode: in the description and id this is negative then you have an error, otherwise a warning. I consider sqlcodes that don't have sqlcode: in the description as not important. :)
Objavite komentar