Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!dsl.pitt.edu!pitt!darth!investor!rbp From: rbp@investor.pgh.pa.us (Bob Peirce #305) Newsgroups: comp.databases Subject: Informix-ESQL/C errors Message-ID: <1990Sep8.192210.26950@investor.pgh.pa.us> Date: 8 Sep 90 19:22:10 GMT Reply-To: rbp@investor.pgh.pa.us (Bob Peirce #305) Organization: Cookson, Peirce & Co., Pittsburgh, PA Lines: 24 According to the FM, "INFORMIX-ESQL/C returns a result code into the sqlca structure after executing every RDSQL statement except DECLARE." Further, sqlca.sqlcode "is set to zero for a successful execution of most statements" and to something else for unsuccessful. However, when I do the following, which I know fails, I get a zero in sqlcode and in the ISAM error code, sqlerrd[1]. Anybody know why? I need to check this stuff to avoid continuing with bad or no data, but I am not getting the expected results. $include sqlca; $ database reports $ SELECT c_name, c_no FROM client where c_no = 12345 <== 12345 substituted for $account into temp c; fprintf(stderr, "Unable to find client record for %d. Sqlcode = %ld, sqlerrd = %ld.\n", account, sqlca.sqlcode, sqlca.sqlerrd[1]); -- Bob Peirce, Pittsburgh, PA 412-471-5320 ...!uunet!pitt!investor!rbp rbp@investor.pgh.pa.us