[Zope-DB] DCOracle2.1.1 problems

Matthew T. Kromer matt@zope.com
Mon, 15 Jul 2002 10:09:17 -0400


Johannes Heinz wrote:

>Hi,
>
>I have just upgraded from DCOracle1.3.2 to DCOracle2.1.1 and
>the following problems:
>
>(1)
>calling a stored procedure with lob_support leads to hanging
>as if the description isn't gotten correctly,
>other stored procedures seem to work.
>(we did not change stored procedures).
>The call is:
>(with c as a cursor)
>c.callproc('lob_support.get_tag_data',<......params....>)
>

There were some LOB fixes checked into CVS within the last couple of 
months; I'd get the latest CVS copy (I havent done a source 'release' in 
a while).   That may help.  If I recall, one of the things fixed was 
BLOB and CLOB OUT values from stored procedures.

>---
>(2)
>Using Lob functions in the form:
>
>c=self.TedOracle.cursor()
>  c.execute('select LENGTH,INHALT_LOB from %s where DOCNUM=%s' % (tablename,docnum))
>  r=c.fetchone()
>  text=''
>  lob=r[1]
>  length=lob.length()
>  restlength=length
>  while restlength>1000:
>    text=text+lob.read(1000)
>    restlength=restlength-1000
>  text=text+lob.read(restlength)
>
>leads to ORA-03127 with the first occurence of lob.read
>("no new operations allowed until the active operation ends")
>

Here's what the error guide has to say about that message:

ORA-03127 no new operations allowed until the active operation ends

Cause: An attempt was made to execute a new operation before the active 
non-blocking operation completed or a new operation was attempted before 
all the pieces of a column were inserted or fetched.

Action: Execute the new operation after the non-blocking operation 
completes. If piecewise binds/defines were done, execute the new 
operation after all the pieces have been inserted or fetched.

I suspect the nonblocking operation in question is due to the way you're 
reading 1000 bytes at a time out of the LOB.  If you do a lob.read() you 
should slurp the entire contents of the lob at once, which may make that 
problem go away.

DCOracle2 does piecewise binds only for LONG colums, not LOBs, but I 
expect the problem has to do with some kind of lingering on the LOB.

>---
>(3)
>A select query of an empty string field in the Oracle Database
>returns the string text "None" (!!!) instead of a None object or an empty string!!!
>
>Could you please tell me, if I have made something wrong or if this is a bug
>(known or unknown or probably yet solved)?
>

I'm not aware of anything like that -- it sounds like something is doing 
a str() on a value of None.  I'd double-check the invoking code to see 
if it's turning results into strings before printing -- nothing in the 
DCOracle2 code does that.

---

Matt Kromer
Zope Corporation  http://www.zope.com/