Does SQLPlus mask ORA-01405 (...value is NULL) error

From: Jim Hill <jimhill_at_nortelnetworks.com>
Date: Tue, 27 Mar 2001 16:19:42 -0600
Message-ID: <99r46h$7rj$1_at_bcrkh13.ca.nortel.com>


I've been asked to pickup maintaining some C code that uses Embedded PL/SQL code. This code's job in life is to read the name of a stored procedure with a template of the required input/output parameters from a file and Execute them against the Oracle database, with the results being sent through an IPC. My problem is that under certain data inputs, the execution returns the infamous -1405 ("fetched column value is NULL").

It's not really a problem to have one of the output parameters be set to NULL, it can just pass through the IPC to the client and let it worry about it. The problem is that since it comes back as an SQL error, it's being handled by the error, not the mainline code. Consequently, the code author simply ignores all errors and blindly passes the (presumably uninitialized) results through the IPC.

I've read how I can set the DBMS=V6 to change this to a warning, but I'm afraid that may impact the handling of VARCHAR data.

Anyway, What I would really like to see is the store procedure change to using an indicator variable to correctly address the problem. The problem is when the DB manager uses SQLPlus to test his procedure, the -1405 error is NOT displayed. Conclusion-"No change is needed. Must be a problem with your C code."

Are there some environment settings that allow SQLPlus to "handle" these errors, or something. I have a feeling I'm going to need to "prove" the error with SQLPlus before I'll get any changes done.

Thanks for any thoughts. Received on Wed Mar 28 2001 - 00:19:42 CEST

Original text of this message