Re: ORA-01405: fetched column value is NULL
Date: Thu, 9 Feb 1995 15:47:50 GMT
Message-ID: <170sysD3qp7q.GqA_at_netcom.com>
Sharkbones (sharkbones_at_aol.com) wrote:
: When I run the reports under ORACLE 7, it seems that the warning
: "ORA-01405: fetch column value is NULL" is returning a negative SQLCODE
...
: This is frustrating. Can anybody offer a solution to this?
: Thanks in advance,
Yes. I believe Oracle introduced this "feature" in Oracle7. That would explain why you didn't see it in V6. You need to use indicator variables for any columns that are selected that can possibly have a null value.
For example, in v6 you had:
select COLUMN
into :HOST_VAR
from TABLE;
In Oracle7, in addition to declaring HOSTVAR in your SQL DECLARE SECTION you must also declare an indicator variable. I've never used Pro*Cobol so I don't know how exactly this is done, but I can tell you in Pro*C indicator variables should be declared as type "short" (a short integer). The Pro*C manual should discuss this. After you have declared this variable (I'll call it HOST_VAR_IND) you have to change the SQL statement above to:
select COLUMN
into :HOST_VAR:HOST_VAR_IND
from TABLE;
- Dan