[Zope] DCOracle2 + Stored Procedure

Matthew T. Kromer matt@zope.com
Mon, 01 Jul 2002 09:28:54 -0400


Ruslan Spivak wrote:

>The point is I have no text field for Connection, only for Id, Title
>and Procedure Name in the Add Form of Stored Procedure.
>
>Thanks for your help in advance.
>
>P.S.: I know I can use an External Method and call stored procedure,
>but I want to have a persistent DB connection
>
>  
>

The stored procedure objects need a DCOracle2 Connection object defined 
to use.
Just add one with the ZMI.

You can use stored procedures 'raw' if you just have a DCOracle2 
connection object, by calling the connection to get a "real" connection, 
then getting a cursor and invoking the procedure that way.  The stored 
procedure objects in DCOracle2 are a convenience for Zope.

Also FYI, stored procedures by default dont allow people to execute 
them; so remember to change the permissions on your procedures if you 
want anonymous users to be able to invoke them.


-- 
Matt Kromer
Zope Corporation  http://www.zope.com/