informix
INFORMIX-ESQL/C Programmer's Manual
Exception Handling

Library Functions for Retrieving Error Messages

Each SQLCODE value has an associated message. Informix message files in the $INFORMIXDIR/msg directory store the message number and its text. For error message documentation, use the finderr or Find Error utility or view Informix Error Messages in Answers OnLine.

When you use SQLCODE and the sqlca structure, you can retrieve error message text with the rgetlmsg() and rgetmsg() functions. Both of these functions take the SQLCODE error code as input and return the associated error message.

Tip: When you use SQLSTATE and the GET DIAGNOSTICS statement, you can access information in the MESSAGE_TEXT field of the diagnostics area to retrieve the message text that is associated with an exception. For more information, see Exception Information.

The following pages describe the rgetlmsg() and rgetmsg() functions.

Important: Use rgetlmsg() in any new ESQL/C code that you write. ESQL/C provides the rgetmsg() function primarily for backward compatibility.


INFORMIX-ESQL/C Programmer's Manual, Version 9.21
Copyright © 1999, Informix Software, Inc. All rights reserved