spitz@GAN03X (Richard Spitz) writes:
>Hi folks,
>just a couple of weeks ago, there was a thread in this group about how
>to get the full error message in an ESQL/C program, using the rgetmsg()
>function. At that point, I was SURE I'd NEVER have to use this. Well,...
>This function works fine, however, the output is like:
>-217: Column (%s) not found in any table in the query.
The %s value is contained in sqlca.sqlerrm. To create the error message,
try the following:
char msgtext[100],
errmsg[100];
rgetmsg(sqlca.sqlcode, msgtext, sizeof(msgtext));
sprintf(errmsg, msgtext, sqlca.sqlerrm);
fprintf(stderr, "Error: %s", errmsg);
NOTE: rgetmsg only provides error messages up to -32767. For errors
beyond this range, you must use rgetlmsg(msgnum, msgstr, len, &retlen);
Troy
==============================================================================
Troy L. Hewitt, CSE INFORMIX-Federal Client Services
Washington, D.C. (703) 524-3600 e-mail: troy@informix.com
==============================================================================