[PyKDE] PyQt and database locking problems

joanne matthews (RRes-Roth) joanne.matthews at bbsrc.ac.uk
Tue Dec 19 17:02:21 GMT 2006


I am getting database locking problems with pyqt and sqlite when I
execute a QSqlQuery. 
I don't have the same error if I use another database with less records
in the table.
Also, If I scroll to the bottom of the qTableView then execute the
query, I don't get 
A database locked message. This problem has been driving me insane now
for quite sometime
As I have now run out of ideas to try.  If the problem was due to there
being an active query 
On the database then why does it work if I just scroll down to the
bottom of the table?
I have attached some source code which demonstates the
Problem and a database. Clicking on remove should just remove the
selected row from the table.

I have tried model.clear(), qsqlquery.clear(), transaction() and
commit().
I've also increased the sqlite timeout.

If anyone can advise me or tell me why I'm getting the problem I'd be
Really greatful. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: landscapesim.db
Type: application/octet-stream
Size: 44032 bytes
Desc: landscapesim.db
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20061219/be02f76e/landscapesim.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IRTest.py
Type: application/octet-stream
Size: 7055 bytes
Desc: IRTest.py
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20061219/be02f76e/IRTest.obj


More information about the PyQt mailing list