Changeset 3326

Show
Ignore:
Timestamp:
08/23/07 09:31:28 (1 year ago)
Author:
ed
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/db/dbSQLite.py

    r3323 r3326  
    5555        pth = os.path.expanduser(connectInfo.Database) 
    5656        pth = pth.decode(sys.getfilesystemencoding()).encode("utf-8") 
    57         self._connection = self.dbapi.connect(pth, factory=DictConnection) 
     57        # Need to specify "isolation_level=None" to have transactions working correctly. 
     58        self._connection = self.dbapi.connect(pth, factory=DictConnection, isolation_level=None) 
    5859        return self._connection 
    5960