dabo Commit
Revision 3326
Date: 2007-08-23 09:31:28 -0700 (Thu, 23 Aug 2007)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3326

Changed:
U   trunk/dabo/db/dbSQLite.py

Log:
After much Googling, I found that the error reported in several cases when 
saving data:

DBQueryException: SQL logic error or missing database

was being caused by the way SQLite handles automatic transactions. Added the 
parameter 'isolation_level=None' to the connection string sets the behavior 
properly.

Please confirm with your applications.


Diff:
Modified: trunk/dabo/db/dbSQLite.py
===================================================================
--- trunk/dabo/db/dbSQLite.py   2007-08-23 15:12:29 UTC (rev 3325)
+++ trunk/dabo/db/dbSQLite.py   2007-08-23 16:31:28 UTC (rev 3326)
@@ -54,7 +54,8 @@
                self._dictCursorClass = DictCursor
                pth = os.path.expanduser(connectInfo.Database)
                pth = pth.decode(sys.getfilesystemencoding()).encode("utf-8")
-               self._connection = self.dbapi.connect(pth, 
factory=DictConnection)
+               # Need to specify "isolation_level=None" to have transactions 
working correctly.
+               self._connection = self.dbapi.connect(pth, 
factory=DictConnection, isolation_level=None)
                return self._connection
                
 




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to