Re: esql-c update return code
Posted in 1998
Martin Berns — — source: Informix-list mailing list archive (1991-1998)
Chaiw Kok Kee schrieb: > > I would like to update a row in a table and if not found, insert the record. > > The return value of update (sqlca.sqlcode) returns a 0 when the record is not > found. I thought it should return 100 just like a select statement. > > Is this a bug? Now I have to do a select first. > > I am using Informix On-line 5.0 > > Any advice appreciated. You will indeed get a return value of 100, if your are running your update statement against an ansi-mode database. But this depends on the version of your informix. I think this behaviour is implemented since 5.0. In all other logging modes (no-logging, buffered- and unbuffered-logging) you'll get a 0. hth martin