[Zope] Calling Stored Procedures using DCOracle

Dieter Maurer dieter@handshake.de
Thu, 6 Jul 2000 23:15:36 +0200 (CEST)


 > When I execute this :
 > >>> conn.callproc('addarticle',['dfdsf'])
 > 
 > I get the following Error :
 > __getattr__
 >     raise error, 'no usable procedure named '+name
 > oci.error: no usable procedure named addarticle
 > 
 > 
 > How ever if I do this :
 > >>> conn.getSource('ADDARTICLE')
 > 
 > It returns the source code.
Notice the (potentially) essential difference:
In "callproc" you use "addarticle" (i.e. all lowercase),
but in "getSource" you use "ADDARTICLE" (i.e. all uppercase).

Maybe, case is essential.

 > In short I need to run my stored procedures from python. They are all ready
 > and waiting to be used. Some one help me :-)
Some days ago, I extended ZOracleDA with a method to call
a stored procedure.

ZOracleDA gives me a cursor. I used:
	return cursor.procedures.<my_procedure_name>(<my_arguments>)


worked fine.



Dieter