Some of the information here may be outdated, please check the book instead
[edit]

Web2py supports multiple database connections since Fall 2007.

It also supports distributed transactions (for postgresql, mysql and firebird)

Assuming you have two (or more) connections let's say:

db1=DAL('postgres://...')
db2=DAL('firebird://...')

in your models or controllers, you can commit them both explicitly with

from gluon.sql import SQLDB
... do your stuff ...
SQLDB.distributed_transaction_commit(db1,db2)

It will rollback and raise Exception on failure.

© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.