Re: Pro*C: ora-01405 when UNPACK_MESSAGE(empty string)
Date: 2 Oct 2002 12:17:45 -0700
Message-ID: <92eeeff0.0210021117.240022c8_at_posting.google.com>
Berny <bernhard.voelker_at_siemens.com> wrote in message news:<anepnp$9uv$1_at_news.mch.sbs.de>...
> Hello NG,
>
> When unpacking an empty string with dbms_pipe.unpack_message(),
> and the sender packed a (even hardcoded) empty string (''),
> I get the following in my Pro*C program:
> ORA-01405: fetched column value is NULL
>
> Another program (which does the same job on the same machine)
> accepts empty strings.
>
> What have I missed? Compile options? Libraries? ...
>
> Oracle 8.0.6.2, SunOS 5.5.1
>
> Thank you for your time,
> Berny
[Quoted] This is from Oracle's Error manual.
ORA-01405: fetched column value is NULL
Cause: The INTO clause of a FETCH operation contained a NULL value,
and no indicator was used. The column buffer in the program remained
unchanged, and the cursor return code was +2. This is an error unless
you are running Oracle7 with DBMS=6, emulating version 6, in which
case it is only a warning.
Action: You may do any of the following:
·_Use the NVL function to convert the retrieved NULL to another value,
such as zero or blank. This is the simplest solution.
·_Use an indicator to record the presence of the NULL. You probably
should use this option when you want a specific action to be taken
when a NULL arises.
·_Revise the cursor definition so that no columns possibly containing
NULL values are retrieved.
/Rauf Sarwar Received on Wed Oct 02 2002 - 21:17:45 CEST