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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Messages

Status
Not open for further replies.

Hattusas

Programmer
Nov 11, 2001
344
TR
Is it possible to modify the sql warning or error messages in db2?I always have to catch the sql message number and modify the explanation in my applications.

Salih Sipahi
Software Engineer.
City of Istanbul Turkey
s.sipahi@sahinlerholding.com.tr
 
Hi Salih,
I'm not sure where the text for these messages live, but I suspect they are hard coded in whatever program you use to generate the error message text.

At many of the installations I have worked at, we have output our own informational message, follow by DB2's formatted one.

Marc
 
Hattusas,

I think you may wish to invoke DSNTIAR, as it will give you DB2's explanation of the error. If it is what your after then I can provide you an example og how to invoke it should you require. A bit further info below.

DB2 provides a utility program DSNTIAR which, given an SQLCA, produces a formatted text message in an application supplied area. The message is in VARCHAR format, i.e. it consists of a 2 byte length field followed by a variable length character field.

Cheers
Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top