[Zope-DB] ZOracleDA procedures

Le grande pinguin rm@mh-freiburg.de
Fri, 5 Jul 2002 14:00:28 +0200


On Fri, Jul 05, 2002 at 01:44:12PM +0200, Bo M. Maryniuck wrote:
> On Friday 05 July 2002 13:33, Iain Anderson wrote:
> > I know you must be able to do this from an External Method - but when I did
> > this I set up the connection in the external method (outside of Zope).
> 
> So You think, I shoud make ONE MORE connect for the same user to run Oracle 
> procedure? If yes, that it sucks, IMHO... :-(

Are you trying to get your hands on the 'raw' connection? A posted a similar
question on the ZPsycoPG mailing list this week and got some answers, basically
in your python code you do:

 # 'con_id' is the Zope id of the database connection

 con = context.con_id()

 # now you can execute queries ...

 result = con.query("SELECT foo FROM bar")

or, if you are in a product:

  con = self.getattr(self, 'con_id')()

   ....


Does this answer your question? Oh, some posters mentioned that there is
a certain danger in this solution: you seem to be outside of Zopes transaction
context ....


 Ralf Mattes
> -- 
> Sincerely yours, Bogdan M. Maryniuck
> 
> Who wants to remember that escape-x-alt-control-left shift-b puts you into
> super-edit-debug-compile mode?
> (Discussion in comp.os.linux.misc on the intuitiveness of commands, especially
> Emacs.)
> 
> 
> 
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db