[Zope] Q: ZPoPy and transactions again, with postgresql.
Hannu Krosing
hannu@tm.ee
Fri, 16 Feb 2001 12:50:32 +0200
Gilles Lavaux wrote:
>
> Hello all,
>
> (NB:Axel.Missbach has asked the same thing some days ago)
>
> Sorry if it's a well_documented_somewhere/stupid question, that's my
> problem:
>
> I want to update a database, several tables, in one http call. I use
> DTML+Zsql methods, several of them during this update. How can I put
> theses
> actions inside one transaction?
>
> I use ZPopyDA+ postgresql
>
> I would appreciate an answer to this. I think it's a 'basic' problem on a
> www+DB system, and that it's very
> easily solved if you use a perl-DBI cgi.
> But with Zope I was unable to find a hint in the documentation/mailing list.
> Is it possible to do all the work inside an external method using directly
> the PoPy library and using the commit/rollback??
Zope does the transactions automatically - i.e. it either commits or
aborts
all work done in one http request.
That is true for both ZODB and most DA-s, including PoPyDA.
----------
Hannu