Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Pro*C, DBMS_PIPE.RECEIVE_MESSAGE() and nullstrings ('')
Berny wrote:
> Hello,
>
> I have the following problem:
>
> I have two programs which call DBMS_PIPE.UNPACK_MESSAGE()
> and receive the NULL value; but one of the programs
> gets a 'ORA-01405: fetched column value is NULL' exception.
>
> They are exactly doing the same thing,
> connect to the same database (8.0.6.2.)
> as the same user, listen to the same pipe,
> run on the same client (SunOS 5.5.1),
> are compiled with the same Makefile within the same
> terminal window, and are linked to the same libraries.
>
> I searched google for a solution and and I found
> something about indicators, but that does not explain
> why the other program does not get the exception.
>
> Is there something I forgot?
> I'm clueless :-(
>
> Thanx in advance,
> Berny
>
> =====================
> This is the code:
>
> ...
> EXEC SQL BEGIN DECLARE SECTION;
> varchar buffer[100];
> EXEC SQL END DECLARE SECTION;
>
> ...
>
> EXEC SQL EXECUTE
> BEGIN
> :oraStatus := DBMS_PIPE.RECEIVE_MESSAGE('my_pipe');
> END;
> END-EXEC;
> if (rc) /* some error */;
>
> EXEC SQL EXECUTE
> BEGIN
> DBMS_PIPE.UNPACK_MESSAGE (:buffer);
> END;
> END-EXEC;
>
> ...
> =====================
>
Sorry, I did not describe the problem correctly. The programs receive a nullstring (''), and one of them gets the exception.
But since '' != NULL, why do I get the exception?
Thank you for your time,
Berny
Received on Wed Oct 02 2002 - 02:06:43 CDT