[DB-SIG] Python 2.0 DB Api - Threading and Transactions not known until connected
Brad Clements
bkc@murkworks.com
Fri, 27 Aug 1999 10:15:11 -0400
On 27 Aug 99, at 9:41, M.-A. Lemburg wrote:
> > How can a user use the my DB if they never call commit? (say, they're
> > doing very simple stuff and don't think of it). Then I'll never call commit?
>
> Right. Transactions are under user control and should not
> be committed automatically.
I think we are getting somewhere.
You said:
1. When issuing a cursor, I should call the underlying ADO.BeginTrans
2. I should never auto-commit, so the user must call
connection.commit()
3. If the user never calls commit, I'll rollback all of their changes when
they close the connection object
4. Hence, users that never call commit(), can not really use the DB
because none of their changes will ever be saved.
Is this correct? Should I therefore assume that all DB users will
ALWAYS call connection.commit (or rollback), and that NO ONE will
ever try to use the DB without using connection.commit?
Brad Clements, bkc@murkworks.com (315)268-1000
http://www.murkworks.com (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com ICQ: 14856937