On Thu, 31 Mar 2005 15:06:30 +0100, Paul Johnston <pa...@we...> wrote:
> Hi,
>
> I'm using cx_Oracle 4.0.1 on SuSE 9.0 with Oracle 10gR1. I've found that
> fetchall does not work properly for CLOB fields - all the rows come back
> with the CLOB field having the same value (the other fields are fine).
> It works find if I use fetchone().
>
> This causes a problem:
>
> for row in self.cur.fetchall():
> ....
>
> But this is fine:
>
> row = self.cur.fetchone()
> while row:
> ...
> row = self.cur.fetchone()
>
> We're happy with the workaround for now, so this isn't urgent, but I
> hope this bug report is useful.
This is a known issue with cx_Oracle 4.0.1 which is resolved in 4.1
but probably not the way you expect. :-) A programming exception is
raised when this situation is detected rather than simply providing
incorrect information. This is necessary because of the way that
Oracle works. BTW, you can more effectively do the following:
for row in cursor:
print "Do something with the row."
which iterates over the rows safely. Hope this helps.
> Regards,
>
> Paul
>
> --
> Paul Johnston, GSEC
> Internet Security Specialist
> Westpoint Limited
> Albion Wharf, 19 Albion Street,
> Manchester, M1 5LN
> England
> Tel: +44 (0)161 237 1028
> Fax: +44 (0)161 237 1031
> email: pa...@we...
> web: www.westpoint.ltd.uk
>
> -------------------------------------------------------
> This SF.net email is sponsored by Demarc:
> A global provider of Threat Management Solutions.
> Download our HomeAdmin security software for free today!
> http://www.demarc.com/info/Sentarus/hamr30
> _______________________________________________
> cx-oracle-users mailing list
> cx-...@li...
> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>
|