Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-1403 on Embedded SQL Update

Re: ORA-1403 on Embedded SQL Update

From: Programming <sysdev_at_mb.sympatico.ca>
Date: Mon, 24 Aug 1998 11:50:58 -0500
Message-ID: <35E199F2.1FFD@mb.sympatico.ca>


Hmm,

I expect that you are getting these errors when you are actually running the program. (there are also compiler errors)

You might want to insert some statements:

EXEC SQL WHEN NO DATA FOUND ...
or
EXEC SQL ON ERROR ... to try to capture the error.

Do you have an error handling routine to print out the entire text of the message, but not necessarily abort the program?

How about EXEC SQL counts on the table?

One thing I noticed was that if I created a cursor, I had to be careful not to FETCH past the last record. I used the ON NO DATA FOUND (check the spelling and syntax) to alleviate the crashing.

Rodger

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
Received on Mon Aug 24 1998 - 11:50:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US