MySQLdb UPDATE does nothing

Magnus Lycka lycka at carmen.se
Fri Sep 16 06:06:17 EDT 2005


Steve Horsley wrote:
> Or, as I found out yesterday, cursor.execute('commit') afterwards.

The correct way to do it is to close the cursor object, and
then do "db.commit()". Don't rely on a cursor object to work
across transaction boundries!

See e.g. www.thinkware.se/epc2004db/epc04_mly_db.pdf and
http://www.thinkware.se/epc2004db/dbapitest.py



More information about the Python-list mailing list