On Fri, Feb 12, 2010 at 08:57:06AM -1000, John Bresnahan wrote:
> I would like to disable autocommit on my underlying database connection. What method do I use to
> force a commit on the connection? I realize that a transaction object has a commit() method, but
> how do I do a similar thing with the connection i acquired via:
>
> sqlhub.processConnection = connectionForURI(config.dburl)
The object created by connectionForURI() is not a DB API connection but
an instance of SQLObject's class DBConnection; it's a high-level object
that remembers connection parameters; it opens and closes real DB
connections when they are needed, it maintains a pool of opened
connections (for multithreaded applications, e.g.). But it cannot be
committed because it's not a real connection (what low-level connection
from the pool are to be committed?)
Use transactions.
Oleg.
--
Oleg Broytman http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|