[Tutor] MySQLdb INSERT with while or for loop

Magnus Lyckå magnus@thinkware.se
Wed Jun 11 19:18:03 2003


At 17:12 2003-06-11 -0500, Decibels wrote:
>Hmm, interesting point. I check and they are autocommited.
>Looked at manual and mysql defaults to that. I put this in my
>notes though to look into it further or for documentation, incase
>there is any issue with mysql not saving the data.

If the MySQLdb is to follow the Python DB-API 2.0 Specification,
it must turn off autocommit by default.
See http://www.python.org/peps/pep-0249.html

"       .commit()

             Commit any pending transaction to the database. Note that
             if the database supports an auto-commit feature, this must
             be initially off. An interface method may be provided to
             turn it back on."



--
Magnus Lycka (It's really Lyckå), magnus@thinkware.se
Thinkware AB, Sweden, www.thinkware.se
I code Python ~ The Agile Programming Language