Re: ORA-01405: fetched column value is NULL

From: Larry E. Snyder <lesnyd_at_monsanto.com>
Date: 1996/08/20
Message-ID: <lesnyd-2008961413300001_at_lesnyd.monsanto.com>#1/1


In article <3219E6D3.6C1B_at_dspace.com>, Benjamin Taub <btaub_at_dspace.com> wrote:

> Does anyone out there have experience with this error message? We are
 fetching values
> into variables and we know that some of the columns will contain nulls.
 It appears that
> these nulls are causing our programs to crash with this error:
>
> ORA-01405: fetched column value is NULL
>
> Is there a quick and easy way to stop this from happening?

I assume you are using embedded SQL in some 3GL. To avoid this error, you must use null indicators in your SQL statements on any column that might have a null in it. A null indicator is a short in C, and if it has a negative value, the column returned is null.

syntax is :variable:null_indicator instead of just :variable

Good luck!

> _______________________________________________
> Benjamin Taub btaub_at_dspace.com
> DATASPACE INCORPORATED http://www.dspace.com
> ph: (313) 761-5962 fax: (313) 761-5967
> THE DATA WAREHOUSE INTEGRATORS


  • Larry E. Snyder * *
  • Monsanto Company * CLEVER QUOTE OR PHRASE GOES HERE *
  • St. Louis, MO * lesnyd_at_monsanto.com *
Received on Tue Aug 20 1996 - 00:00:00 CEST

Original text of this message