I ended up solving this but it's very odd.

I do my own DB work with QSqlQuery, but commit any transaction I open.  I
have two QSqlTableModels which I use.  In one of the QSqlTableModels I was
using setQuery to select a subset of the columns I needed.  That ended up
being the issue.  When I remove the setQuery call and simply ignore the
unneeded columns from the view, everything works.

BZ


On Thu, Jan 19, 2012 at 11:24 PM, Brian Zambrano <bri...@gmail.com> wrote:

> In my application I have a Sqlite db which at times needs an updated
> schema.  To work around some issues on Windows, I need to do "drop table"
> for each table.  However, I'm continuously getting:
>
> "database is locked Unable to fetch row"
>
> after each "DROP table table_name" statement.  There are no other queries
> I'm running or uncommitted transactions.  Can some of my QSql* widgets be
> holding on to locks which prevent the tables from being dropped?
>
> BZ
>
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to