[Zope-DB] ZOracleDA and CLOBs

Brian Brinegar brinegar@pier.ecn.purdue.edu
Tue, 13 May 2003 16:03:20 -0500


Hello,

I am having trouble getting the data for a CLOB out of Oracle within 
Zope. I started with a ZSQL Method which queries my table containing 
CLOBs. I'm not sure what type of object I got back for the CLOB column. 
When I try to display it I get an error saying "__str__ returned 
non-string (type None)" if I call read() on the result it returns None.

So after poking around a bit I found in the ZOracleDA README file that 
LOBs will only work if the "Maximum rows to retrieve" is set to 1. After 
making that change the result is "<LobLocator object at 0x144adf20>" now 
I'm not sure if this is a ZOracleDA LobLocator or a DCOracle2 LobLocator 
object. If I try to call the read() method on this object I get an 
Unauthorized Error.

I did notice that the LobLocator object in ZOracleDA has a lob 
attribute, if I try to access lob on my result I get an Attribute Error. 
The LobLocator object in ZOracleDA also has the 
__allow_access_to_unprotected_subobjects__ attribute set. So I think I'm 
getting back the wrong LobLocator object.

Any suggestions?

I will play around when I get a chance to see if the _lobConvert method 
is functioning correctly.

Thank you,
Brian Brinegar
ECN Web System Developer
Purdue University
West Lafayette, IN