Posted: Thu May 01, 2003 1:51 pm Post subject: SQLCODE
Apprentice
Joined: 19 Mar 2002 Posts: 35
I am having some problems with SQLCODE. WMQI 2.1 CSD4 to Oracle 8.1.6 inside a compute node. When I treat database warnings as errors I get returned SQLCODE=100 when the row that I am searching for exists and doesn't exist. When I uncheck that box SQLCODE=0 if the row exists or not. What I was expecting was with warnings as errors checked on a select where the row did not exist I would get a SQLCODE=100 and if it did exist I would get SQLCODE=0. Am I misinterpretting these variables? Thanks in advance.
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
Where are checking this value of SQLCODE? Are you looking into ExceptionList or SQLCODE variables?
If you are looking into SQLCODE variable then you have to make sure you don't selct Throw Exception on Database Errors. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
Posted: Thu May 01, 2003 11:51 pm Post subject: Re: SQLCODE
Apprentice
Joined: 25 Jul 2002 Posts: 35 Location: Germany
gmabrito wrote:
I am having some problems with SQLCODE. WMQI 2.1 CSD4 to Oracle 8.1.6 inside a compute node. When I treat database warnings as errors I get returned SQLCODE=100 when the row that I am searching for exists and doesn't exist. When I uncheck that box SQLCODE=0 if the row exists or not. What I was expecting was with warnings as errors checked on a select where the row did not exist I would get a SQLCODE=100 and if it did exist I would get SQLCODE=0. Am I misinterpretting these variables? Thanks in advance.
It is a known problem. Currently, in your case, if the SQLCODE value is 0 or 100, you should check using ESQL whether any rows were returned by the SELECT.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum