[Zope-DB] roll back

Charlie Clark charlie at egenix.com
Tue Aug 29 18:51:16 EDT 2006


Am 30.08.2006, 00:44 Uhr, schrieb Maslak, Michael  
<Michael.Maslak at gdit.com>:

> Did what you suggested. That is, removed the BEGIN TRANSACTION & COMMIT
> TRANSACTION statements. It has the same behavior: a non-atomic commit.
> No roll back. mat1 has a new record mat2 errors.

Please keep your reply on list.

<dtml-except>

   <dtml-raise MAT_SQL_FAILURE> <dtml-var error_value></dtml-raise>

I don't use DTML - but if your DTML maps to a
try:
	this()
except:
	that()

Then you are still acting outside the Zope transactional management! I  
suggest you rewrite your code to use two ZSQL methods and call them from a  
PythonScript
simply
context.mat_1()
content.mat_2()

It's easier than you think.

Charlie


More information about the Zope-DB mailing list