reading CLOBs with DCOracle2 gives empty string
Stephen Riek
stephenriek at yahoo.co.uk
Fri Jan 31 23:27:44 EST 2003
Using DCOracle2 module, I can connect to my Oracle database and
can select a row which contains a CLOB. However, when I try to
read() from the LobLocator, I always receive an empty string.
>>> import DCOracle2
>>> db = DCOracle2.connect("system/manager at testdb_192.168.0.4")
>>> c = db.cursor()
>>> c.execute("select * from cms_contents where content_id = 85")
1
>>> r = c.fetchone()
>>> r
[85.0, 85.0, 'Test title', <LobLocator object at 00E08628>,
OracleDate("2000-07-18 00:00:00")]
>>> lob = r[3]
>>> lob
<LobLocator object at 00E08628>
>>> lob.length()
584
>>> lob.read()
>>>
The above occured with the DCOracle2 package available from the
Zope.org site. I even got the latest CVS versions (rev1.98 of
DCOracle2.py and the latest .pyd binary for Windows & Python2.1)
but it still doesn't work.
Am I doing something wrong or is this a bug with the module ?
Thank you,
Stephen.
More information about the Python-list
mailing list