Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"ORA-01405" returned with .NET driver on Oracle server 9.2

545516Nov 13 2006 — edited Nov 13 2006
Hi.
I am developing a web application (with ASP.NET, framework version 1.1)
which has to run some queries on a Oracle server (version 9.2), through
System.Data.OracleClient.OracleDataAdapter.

When I run a particular query, I retreive the following error through
the .NET driver
"ORA-01405: fetched column value is NULL".


The SQL query that raises the problem is something like that
"SELECT [...],
RIGHE_OFF.IS_CANONE As Canone,
[...]"


Moreover, if I run the same query with TOAD (sql client for Oracle), no
exception is raisen, even if some NULL data is effectively returned.


After several hours wihtout any idea, I found a "dirty" solution to fix
the problem, and now my query is
"SELECT [...],
CASE WHEN RIGHE_OFF.IS_CANONE IS NULL THEN
NULL
ELSE
RIGHE_OFF.IS_CANONE
END As Canone,
[...]"


The query finally returns what I need, but my solution is just a
workaround on the problem, because, even looking for informations on
the net, I coudn't understand the problem.
And, above all, I don't understand why, with such a fool artifice, I
could solve the problem!


Can someone tell me how to avoid that stupid trick, or at least why I
have to do it?
Thanx in advance!
Alessio
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 11 2006
Added on Nov 13 2006
18 comments
853 views