[Zope] ZstoredProcedure help!

Ricardo Seghizzi ricardo@cnbe.mar.org.uk
Thu, 26 Jul 2001 12:52:00 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0028_01C115D1.C3083E10
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



Hi,

I have created a packge in my oracleDB with a simple procedure to test=20
and learn to use Z Stored Procedures. My packege and procedure works in
Oracle ok.

Here is the code:

PACKAGE test_pkg IS
  PROCEDURE conta_reg;
END;


PACKAGE BODY TEST_PKG IS
  PROCEDURE conta_reg=20
  IS=20
    total NUMBER;
  BEGIN
   SELECT COUNT(*) INTO total FROM ASSUNTOS;
    END;
END;

Them I created in Zope a ZstoredProcedure object to test my procedure( =
initially it was a function that returned the value of total).
=20
After creation my ZstoredProcedure returned the message:
=20
"procedure TEST_PKG.CONTA_REG has arguments:"

So it reconized the TEST_PKG.CONTA_REG in the oracle database.

Then I decided to test the procedure call and pressed test and got the =
following error:

(6550, 'ORA-06550: line 1, column 27:\012PLS-00103: Encountered the =
symbol ":" when expecting one of the following:\012\012 ( ) - + mod not =
null others \012 avg\012 count current exists max min prior sql stddev =
sum variance\012 cast \012 \012The symbol ":" was ignored.')=20

Does anyone knows what is going on? Why ZstoredProcedure didn't call =
correctly the TEST_PKG.CONTA_REG in the oracle database?=20

Any bug in ZstoredProcedure that I am not aware?

Thanks=20

Ricardo





------=_NextPart_000_0028_01C115D1.C3083E10
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have created a packge in my oracleDB =
with a=20
simple procedure to test </FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2>and learn </FONT><FONT =
size=3D2>to use Z Stored=20
Procedures. My packege and procedure works in</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Oracle ok.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Here is the code:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>PACKAGE test_pkg IS<BR>&nbsp; PROCEDURE =

conta_reg;<BR>END;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>PACKAGE BODY TEST_PKG IS<BR>&nbsp; =
PROCEDURE=20
conta_reg <BR>&nbsp; IS <BR>&nbsp;&nbsp;&nbsp; total NUMBER;<BR>&nbsp;=20
BEGIN<BR>&nbsp; &nbsp;SELECT COUNT(*) INTO total FROM=20
ASSUNTOS;<BR>&nbsp;&nbsp;&nbsp; END;<BR>END;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Them&nbsp;I created in Zope a =
ZstoredProcedure=20
object to test my procedure( initially it was a function that returned =
the value=20
of total).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>After creation my&nbsp;ZstoredProcedure =
returned=20
the message:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"procedure TEST_PKG.CONTA_REG has=20
arguments:"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So it reconized the TEST_PKG.CONTA_REG =
in the=20
oracle database.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Then I decided to test the procedure =
call and=20
pressed test and got the following error:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>(6550, 'ORA-06550: line 1, column =
27:\012PLS-00103:=20
Encountered the symbol ":" when expecting one of the following:\012\012 =
( ) - +=20
mod not null others <AN identifier>\012 <A delimited-identifier =
double-quoted><A=20
variable bind>avg\012 count current exists max min prior sql stddev sum=20
variance\012 cast <A specification set character with literal =
string>\012 <A=20
number><A string SQL single-quoted>\012The symbol ":" was ignored.') <!--=0A=
Traceback (innermost last):=0A=
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 223, =
in publish_module=0A=
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 187, =
in publish=0A=
  File C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 221, in =
zpublisher_exception_hook=0A=
    (Object: Z_Oracle_Stored_Procedure)=0A=
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 171, =
in publish=0A=
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\mapply.py, line 160, in =
mapply=0A=
    (Object: manage_testZOracleStoredProcedure)=0A=
  File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 112, =
in call_object=0A=
    (Object: manage_testZOracleStoredProcedure)=0A=
  File C:\PROGRA~1\WebSite\lib\python\Products\ZOracleDA\SP.py, line =
167, in manage_testZOracleStoredProcedure=0A=
    (Object: Z_Oracle_Stored_Procedure)=0A=
  File C:\PROGRA~1\WebSite\lib\python\Products\ZOracleDA\SP.py, line =
141, in __call__=0A=
    (Object: Z_Oracle_Stored_Procedure)=0A=
  File =
C:\PROGRA~1\WebSite\lib\python\Products\ZOracleDA\DCOracle2\DCOracle2.py,=
 line 1072, in __call__=0A=
    (Object: TEST_PKG.CONTA_REG)=0A=
  File =
C:\PROGRA~1\WebSite\lib\python\Products\ZOracleDA\DCOracle2\DCOracle2.py,=
 line 726, in execute=0A=
DatabaseError: (see above)=0A=
=0A=
--></A></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Does anyone knows what is going on? Why =

ZstoredProcedure didn't call <FONT face=3DArial size=3D2>correctly =
</FONT>the=20
TEST_PKG.CONTA_REG in the oracle database</FONT><FONT face=3DArial =
size=3D2>?=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Any bug in ZstoredProcedure that I am =
not=20
aware?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Ricardo</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_0028_01C115D1.C3083E10--