[PyQt] SQLite database not closing

Louis Cordier lcordier at gmail.com
Wed Mar 7 12:19:46 GMT 2012


Hi, I am currently having problems with closing a database (SQLite)
connection.

The database and driver's lastError is:
"unable to close due to unfinalised statements Error closing database"

I am not sure what this really means or what I should be doing to get the
connection to close properly.
I am using sqlite3 3.6.22 and pyqt 4.7.2.

My test code is here:
http://pastebin.com/q8ZsBQcL
http://pastebin.com/VgjRggy7

There database is something simple like,

CREATE TABLE IF NOT EXISTS tempEarnings
(
    EmployerId              TEXT NOT NULL,
    EmployeeId              TEXT NOT NULL,
    Surname                 TEXT,
    FirstName               TEXT,
    COL01                   REAL,
    COL02                   REAL,
    COL03                   REAL,
    COL04                   REAL,
    PRIMARY KEY(EmployerId, EmployeeId)
);

Insert a few rows to work with.

Hope this helps.

Regards, Louis.

-- 
Louis Cordier
cell: +27721472305
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120307/b6def8a6/attachment.html>


More information about the PyQt mailing list