[Zope-DB] rollback / commit inside DTML : How To ??

Smith, Neil (Worcester) Neil.Smith@npower.com
Thu, 10 Oct 2002 16:12:35 +0100


Just create ZSQL methods with a commit and a rollback in them, then call
them with a dtml-call just like you'd normally do with a SQL method.

--
Neil

-----Original Message-----
From: Harald Koschinski [mailto:harald.koschinski@friatec.de]
Sent: 10 October 2002 15:59
To: Matthew T. Kromer; zope-db; Federico Di Gregorio
Subject: Re: [Zope-DB] rollback / commit inside DTML : How To ??


Hi,

>
> Agreed -- dont try to abort or commit the transaction *during* the 
> transaction.  You'll get in a world of hurt if you try.

Sorry, but I must dissagree -
the question is: What is a transaction?

In the case that one REQUEST is one TRANSACTION Zope is doing everything 
automaticly correct - fine. :-)
But: If you have some more complicated applications there are several 
transactions and subtransactions during one REQUEST.
In the case of a failure you don't want to have a rollback for all 
transactions - you (I) want to controll which transactions have to 
commit by hand. :-(

So I ask my question again: How can I use the python functions for 
transaction control inside DTML.

(please don't give the answer, that developing in DTML is a mistake and 
python is more clever for such complicated application. I use both in a 
mixed structure but decided to do the database
transactions in dtml, because zsql is very nice)

regards
Harald

>


_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://lists.zope.org/mailman/listinfo/zope-db
**********************************************************************
 
The information contained in this e-mail is confidential and intended only for the use of the addressee. If the reader of this message is not the addressee, you are hereby notified that you have received this e-mail in error and you must not copy, disseminate, distribute, use or take any action as a result of the information contained in it.
    
If you have received this e-mail in error, please notify postmaster@npower.com (UK 01384 275454) and delete it immediately from your system.
    
Neither Npower nor any of the other companies in the Innogy group from whom this e-mail originates accept any responsibility for losses or damage as a result of any viruses and it is your responsibility to check attachments (if any) for viruses.

Npower Limited
Registered office: Windmill Hill Business Park, Whitehill Way, Swindon SN5 6PB. Registered in England and Wales: number 3653277

This e-mail may be sent on behalf of a member of the Innogy group of companies.

**********************************************************************