[DB-SIG] Transactions: how to start them?
W. Craig Trader
Wed, 17 Sep 1997 13:05:50 -0400 (EDT)
On Wed, 17 Sep 1997, Andrew Kuchling wrote:
> In the DB-API, Connection objects have commit() and rollback() methods
> to commit or abort a transaction. However, the API doesn't specify
> how to indicate the *start* of a transaction; is it database-specific?
> It seems like an omission from the spec; what am I missing?
For a typical database, when you open a connection, you've started a
transaction; when the connection is closed the database will either commit
or rollback (it depends upon the database) the transaction. If you choose
to commit or rollback the transaction on a connection yourself, that
transaction will be stopped and a new transaction will be started. You
*will* need to check with your database vendor's documentation about
whether the default is to commit or to rollback the transaction.
Illustra commits by default; MySQL and mSQL don't support transactions at
all. Those are the only databases I've used that have Python interfaces
(and none of those interfaces use the DB-API).
W. Craig Trader | Excellence can be attained if you:
Production Manager | Care more than others think is wise
Barking Mad Productions | Risk more than others think is safe
mailto:email@example.com | Dream more than others think is practical
http://www.unicornsrest.org | Expect more than others think is possible.
DB-SIG - SIG on Tabular Databases in Python
send messages to: firstname.lastname@example.org
administrivia to: email@example.com