Re: rgetmsg (esql/c) can lead one astray
Posted in 1996
Generating the error message is a two step process... First you must generate a new error message based on the string returned from rgetmsg() and the string in sqlca.sqlerrm. You then printf that error message. This was discussed years ago... I'm sure that the procedure is on file at the Emory Archives. tom dorgan <amidasws@rmi.net> wrote in article <3253DCCF.5DB3@rmi.net>... > hello > > in esql/c if you call the rgetmsg function which "converts an Informix > error mesage number into the corresponding message text string" and then > send the string straight out via {f,v}printf, you will get a core dump > in certain cases as what you get back can contain format strings that > the printf routines take to indicate that you will be sending further > arguments for. example: > I got back "Error in the column name %s". sending that directly to > printf dumps core as printf is looking for something to %s print. > > pretty nifty trick. Maybe this has been changed in after 4.0 > > cheers, > tom dorgan. > > "I hate databases" > DAS -- David Snyder @ Towers Perrin - Philadelphia, PA EMAIL: (h) dave@ece.vill.edu (w) snyded@towers.com WEB: http://www.ece.vill.edu/~dave/ (Now NETSCAPE enhanced!)