[Zope-DB] DCOracle2: ORA-06502: PL/SQL: numeric or value error: character string buffer too small

Matthew T. Kromer matt at bane.mi.org
Wed Dec 8 22:43:13 EST 2004


John, I think there's something else to set the size of the output 
buffers you need to use;

(peruses code ... time passes ...)

What I think you want to try is to set the output size on the cursor 
with a cursor.setoutputsize(column, size)  -- I *think* you can then 
pick up a procedure bound to that cursor by using cursor.findproc but I 
don't see the cursor substitution code.

  This code is old and very gross right now.  It appears that if you 
pass in a bindingarray to the stored procedure it gets passed through, 
so you shouldn't need to do what I just said.  I haven't worked with 
the codebase in about a year and a half and this section of the python 
bindings was always very gross to me; I just never fixed it.

Its likely I'll need to see the DCO2TRACEDUMP to look at the bind, to 
make sure the size was actually set up right to Oracle.

On Dec 6, 2004, at 4:00 PM, John Ziniti wrote:

> I get the traceback below when calling a stored procedure, but I am
> pretty sure that the OUT parameter that is being written to is
> large enough for the output, as I can run the SP with the same
> parameters using sqlplus.  This is DCOracle2 1.3b on Oracle 9.2.0.5.
>
>
> The Traceback:
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python2.3/site-packages/AIMS/Generations/import.py",
> line 112, in ?
>     blastOut = curs.procedure.generations.JAVAMARKERINSERT_PROC('-prd',
> 'CRHR1_23964', flank5, variant, flank3, 'false', 'pgabot', blastParams,
> '0', '2', resultMessage)
>   File "/usr/local/lib/python2.3/site-packages/DCOracle2/DCOracle2.py",
> line 1526, in __call__
>     cursor.execute(sql,__plist=args)
>   File "/usr/local/lib/python2.3/site-packages/DCOracle2/DCOracle2.py",
> line 1001, in execute
>     result = self._cursor.execute()
> dco2.DatabaseError: (6502, 'ORA-06502: PL/SQL: numeric or value error:
> character string buffer too small\nORA-06512: at
> "GENERATIONS.JAVAMARKERINSERT_PROC", line 16\nORA-06512: at line 1')
>
> The __doc__ for the Stored Procedure:
> procedure GENERATIONS.JAVAMARKERINSERT_PROC has arguments:
>    DEVORTESTORPRDDB IN VARCHAR2
>    NEWMARKERSEQ IN VARCHAR2
>    FLANK5SEQUENCE IN VARCHAR2
>    VARIANTSEQUENCE IN VARCHAR2
>    FLANK3SEQUENCE IN VARCHAR2
>    INSERTINTODB IN VARCHAR2
>    PROGRAMUSERNAME IN VARCHAR2
>    BLASTPARAMETERS IN VARCHAR2
>    FLANKSBASEMISMATCH IN VARCHAR2
>    VARIANTSBASEMISMATCH IN VARCHAR2
>    MARKERINSERTMSG OUT VARCHAR2
>
> My Python code:
> resultMessage = cnxn.BindingArray(1, 80000, 'SQLT_STR')
> curs.procedure.generations.JAVAMARKERINSERT_PROC('-prd', 'CRHR1_23964',
> flank5, variant, flank3, 'false', 'pgabot', blastParams, '0', '2',
> resultMessage)
>
> I get the same Exception no matter what I do for the resultMessage
> parameter (plain string, None, SQLT_CLOB, SQLT_CHR).
>
> Other details provided if needed.
>
> Thanks in advance for any help,
> John Ziniti
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB at zope.org
> http://mail.zope.org/mailman/listinfo/zope-db



More information about the Zope-DB mailing list