[Zope-DB] DCOracle2 OracleDate and parameter sequence problem

Matthew T. Kromer matt@zope.com
Wed, 10 Oct 2001 10:19:06 -0400

Christopher Jenkins wrote:

>Thanks for looking at this.
>Yes, I have the latest updates.  I ran your test program with the
>following results:-
>Traceback (most recent call last):
>  File "stest.py", line 21, in ?
>    c.executemany(stmt, l2)
>  File
>line 921, in executemany
>    result = self._cursor.execute(batchend-batchstart)
>dco2.DatabaseError: (1480, 'ORA-01480: trailing null missing from STR
>Examination of the table stest shows that it has four rows and
>S is null in all rows.
>I am using Oracle 9.0.1 and I assume you are using 8.1.  Perhaps
>there is some incompatibility between the different versions of
>the client libraries or there may be a bug in the version that
>I am using - it would be useful to get results from a variety
>of environments.
>I am unsure as to what further tests I should run to try to
>pinpoint the cause of the problem - I would welcome any
>suggestions you might have.
>I realise that unless the problem can be reproduced in another
>environment, it will be difficult to track down the exact
>Since the problem has an obvious work around (multiple
>calls to execute()), it may not be worth spending a lot
>of time on unless there are more reports of the same fault.
>Thanks for all your help up to now - it is very much appreciated.

OK, one last suggestion.  (well, maybe 2).   First is be sure to compile 
the dco2.so file yourself rather than taking a prebuild binary (although 
try the prebuilt binary if you havent).  Second, inside DCOracle2.py, 
there is a big warning area about a setStatic call  -- try commenting 
that line out; this will use dynamic binds rather than static binds and 
might make a difference.

Also, if you export DCO2TRACEDUMP=dco2.tracedump, you can send me the 
dco2.tracedump file when it happens again and I can look at the data in 
the trace.  The trailing NULL missing data is what I want to see, and 
the traceback should show me the length of the strings reported.