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

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:


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

from gluon.sql import SQLDB
... do your stuff ...

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.