[DB-SIG] oracledb module: why fetchall() doesn't

Ronald Hiller ron@graburn.com
Fri, 04 Dec 1998 22:38:19 -0500


I have been looking through the Oracle OCI docs and Anthony Baxter's
oracledb code.  It appears the reason it sometimes fails to deliver all
rows of a query with a fetchall() is due to the handling of NULL.  The
ofen() call will return an ORA-01405 when it encounters a NULL column.  It
will return all rows up to and including the one with the NULL, but none
beyond that.

The Digicool module retrieved rows one at a time and used the 1405 code to
insert a Python "None" into the returned list.  Therefore, it works
correctly.  The OCI docs say that "indicator variables" (basically a
parallel array that gets filled in by Oracle with the real/Null info) is
the way to go.

Now, I will poke around to see how hard it is to implement this...

Ron