Re: ORA-1403 on Embedded SQL Update

From: Marcus Reichardt <mr_at_diamanda.hh.eunet.de>
Date: Mon, 24 Aug 1998 17:14:00 +0200
Message-ID: <35E18338.6AF2_at_diamanda.hh.eunet.de>


rbonebra_at_my-dejanews.com wrote:
>
> Using Oracle 7.3.2 on MVS with PRO*COBOL Pre-compiler version 1.8.
>
> Converting proprietary database records to Oracle. We have INSERTed a row
> using host variables. The input file contains a record with the same key
> values of the row already inserted. Oracle returns an error code indicating
> we have a duplicate record.
>
> We fall into a routine to try to UPDATE one of the non-key fields with
> information from the record in the input file. However, we consistantly get
> an ORA-1403 error returned by ANY other embedded SQL statement other than the
> INSERT. It's as if our host variables are not recognized for use to SELECT,
> UPDATE, or DELETE the row (and we have tried them all). The 1403 seems to be
> a failure code that the pre-compiler sets up and my not be indicative of a
> true error, but it's enough to blow us out of the water and not accomplish
> our goal.
>
> Is there anyone out there familiar with a similar situation when using host
> variable laden embedded SQL passing through a PRO*COBOL pre-compile? Or, has
> anyone, using any pre-compiler, had similar difficulties or gotten the
> mysterious 1403 when they don't think they should have?
>
> Any help will be greatly appreciated.
>
> Ray Bonebrake
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

Sounds like if you're not re-setting the session error code after first error encountered. Try WHENEVER SQLERROR CONTINUE or WHENEVER SQLERROR GO TO ... immediately before next SQL statement following the failed INSERT statement.

Marcus Reichardt Received on Mon Aug 24 1998 - 17:14:00 CEST

Original text of this message