[Zope-DB] Probably bug in DCOracle2
Bo M. Maryniuck
b.maryniuk@forbis.lt
Fri, 8 Nov 2002 11:58:06 +0200
Hi, Matt and Zope DB Folks.
There is _probably_ a bug in DCOracle2, but I'm not sure, let us see. Her=
e is=20
a function on Oracle 8i which returns VARCHAR2:
function PM.PM_08.CLOB_FPRINT returns OUT VARCHAR2, has arguments:
P_ID IN NUMBER
P_AMOUNT IN NUMBER
P_POS IN NUMBER
And if you want get it via Zope PythonScript, you can set P_AMOUNT only u=
p to=20
0xFF and only then it works:
=09result =3D context.cFprint(P_ID =3D 9653, P_AMOUNT=3D256, P_POS =3D 25=
0)
But if you want to set some bigger value (e.g. 257 or 3000), you'll get a=
n=20
error:
Error Value: (6502, 'ORA-06502: PL/SQL: numeric or value error: character=
=20
string buffer too small\nORA-06512: at line 1')
On the other hand, if you do in ZSQLMethod something like:
=09select pm.pm_08.clob_fprint(9653, 3000, 1) from dual
There is no problem and I get the result I want. So this is probably a bu=
g and=20
probably DCOracle2 tries to handle VARCHAR2 as 0xFF string. Any suggestio=
ns?
--=20
Regards, Bogdan
Microsoft has performed an illegal operation and will be shut down.
=09=09-- Judge Jackson