[Tutor] Opening and closing SQLite db

Timo timomlists at gmail.com
Sun Dec 26 16:09:05 CET 2010


Hello, I use SQLite in my application as database, but I think I'm doing
something wrong.

Currently, I open a connection and cursor object every time I do an
operation (insert, select, update, ...) and close it afterwards. Now I was
wondering if it wouldn't be better to open the connection if my application
starts, and commit and close when the user quits.
Is this save? Can data be selected if I haven't commit anything?

Cheers,
Timo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101226/35034320/attachment.html>


More information about the Tutor mailing list