[Tutor] Opening and closing SQLite db

Noah Hall enalicho at gmail.com
Sun Dec 26 17:16:41 CET 2010


As a rule, I tend to open and close a connection based on what I'm doing
with the database. If I were to directly run a series of queries one after
another, I would keep it open until a change in interface (referring to
changes in objects, both masters and slaves).
Also, you can perform any query that does not change any records safely
without a commit, for example, searches. For everything else, you need to
call commit - but you don't need to close the connection.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101226/8a1a9622/attachment.html>


More information about the Tutor mailing list