[DB-SIG] Transaction start

Andy Todd andy47@halfcooked.com
Sun, 26 May 2002 09:21:53 +1000


Gerhard Häring wrote:
> The DB-API Connection object has commit and rollback methods, but it
> lacks a begin method.
> 
> Not considering the implementation of an autocommit feature, does this
> mean that the DB-API module must implicitely start, and possibly roll
> back transactions at certain points?
> 
> I guess a cursor.execute must start a new transaction, where else must a
> transaction be started? Could anybody please clarify this?
> 
> TIA,
> 
> Gerhard

For the databases that I have used a transaction starts;

a) When you connect to the database
b) After each commit or rollback

I haven't ever come across an explicit 'begin' statement, mind you that 
doesn't mean there isn't one ;-)

Regards,
Andy
-- 
----------------------------------------------------------------------
 From the desk of Andrew J Todd esq - http://www.halfcooked.com