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: Fun and games with Pro*C

Re: Fun and games with Pro*C

From: Lonnie Blevins <lblevins_at_regenstrief.org>
Date: Wed, 11 Jun 2003 09:48:38 -0500
Message-ID: <bc7fgb$3g3$1@hood.uits.indiana.edu>


When the error is trapped by your code, look at the contents of of the oraca.orastxt value. I have the following snippet of code that appends the last SQL statement to the other info I put into the error message I construct in err_text, (which is char err_text[4096] in my PC code).

                        strcat( err_text, "SQL: " );
                        strncat( err_text,
                                oraca.orastxt.orastxtc,
                                oraca.orastxt.orastxtl );
                       /* Get text of last SQL statement */

#"Michael L. Hostbaek" <carlos_at_pez.dk> wrote in message news:slrnbedv4l.tu5.carlos_at_freebsdcluster.dk...
> Group,
>
> I am forced to debug an old Pro*C program, that have been semi working
> for a year or two. It is giving some trouble, so I was kinda hoping
> someone from this list could help me out.
> I finally got preprocessor working, without error on the code - and gcc
> is compiling the code without too many erros ;)
>
> The program dies, with a :
> ERREUR : sqlerrmc = ORA-01405: fetched column value is NULL
>
> I'd very much like to locate what it is having trouble fetching, and
> where. I have look through the SQL statements in the code, and tried
> setting debug printf's here and there - without too much success. So my
> questions is... Would it be possible to make the ORA-01405 a bit more
> verbose ? Fx. printing the last SQL statement...
>
> Thanks in advance..
>
> /mich
>
>
> --
> Regards,
> Michael L. Hostbaek
> -= So long, and thanks for all the fish.. =-
>
Received on Wed Jun 11 2003 - 09:48:38 CDT

Original text of this message

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