Re: Closing Connections between Queries
Roger Binns <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kyle Stevens wrote: > If I did what Rich suggested, commit the transaction but leave the > connection open, wouldn't that prevent any cache schema errors? If you leave the connection open then it caches stuff therefore that is how to get schema errors. http://initd.org/tracker/pysqlite/ticket/194 However you'll only get this if you do change the schema. If you do it just once at startup then thre is nothing to worry about. > Then I > wouldn't have to worry about opening and closing the connection each time. Code whatever is the simplest. It is by far best practise to not use connections in different threads. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG9BKCmOOfHg372QQRAttlAKDMNI70plbedZc5CApEIn5MNPB28QCcD735 4S4JU33uSwP4dKbjoM/JXL4= =swGe -----END PGP SIGNATURE-----