[Zope-DB] Q2: can you show an working DB transaction example ?

fowlertrainer at anonym.hu fowlertrainer at anonym.hu
Tue Dec 2 08:22:57 EST 2003


Hello !

I read the Book, I read every on the web, but I can't see example, how
to I access the transaction of an ZSQL method.

There is a web-site, with apply possibility.
But I want to write more tables, and I want to protect/isolate it with
transaction. If it is get error, then I want to rollback...

The logic is:

try:
  start
  table1.apply
  ...
  tablen.apply
  commit
  res=1 / show ok
except:
  rollback
  res=0 / show error

I don't see any example or other info to HOW I ACCESS THE DA, AND IT'S
TRANSACTION.

I want to do this write in PythonScript.
How I access the DA from it ???
How to access the object ?

Please write a simple example line !!!

Thanx.

-- 
Best regards,
 fowlertrainer                          mailto:fowlertrainer at anonym.hu




More information about the Zope-DB mailing list