Re: [SOLVED]: ZSQL meyhod fr an Oracle Stored Procedure that Returns a ref_cur
Willi Langenberger <[email protected]> Mon, 19 Nov 2007 13:22:39 +0100
| Newsgroups | gmane.comp.web.zope.database |
|---|---|
| Message-ID | <[email protected]> |
According to banaouas:
> > If you are writing to a transactional database, you should add
> >
> > conn._register()
> >
> > to register that connection for the zope transaction
> > machinery. That way the Zope Publisher calls "commit" at the end of a
> > successful request (or "abort" on error).
>
> Initially, I needed to access to this oracle database only for read
> operations.
> But even for read only access, it might be a good practice to add this
> commit, cause sometime database engins hold some kind of lock on the read
> data, depending on how transaction was started.
It might be a good practice, because you never know, if your
application will eventually also be writing to the DB. I don't know if
it has an effect on read only operations.
> I imagine that zsql class do implicitely this commit ?
Strictly speaking its no "commit", its a "registration for
commit/abort". And yes, for ZSQL methods this is done implicitly (via
the "query" method of the DB class).
\wlang{}
--
[email protected] Fax: +43/1/31336/9207
Zentrum fuer Informatikdienste, Wirtschaftsuniversitaet Wien, Austria