Qt-interest Archive, May 2008
Re: QSqlDatabase problem with QSQLITE driver.
Message 1 in thread
Stephan Rose wrote:
> On Mon, 2008-04-21 at 08:30 +1000, Bill KING wrote:
>> Shot in the dark here, but have close/clear'd any sql statements you
>> have used, or descoped them?
>> It looks like you have an sql statement still open somewhere from a
>> quick look at the sqlite code.
>
> Yep I know that is the case. However, I have no control over the query.
> I'm simply creating a QSqlQueryModel, giving it my SQL query string and
> assigning it to a view. I would expect it to handle everything else as
> necessary internally without me needing to worry about it.
>
> If I need to track every single SQL Query myself then I'm better off
> interfacing with SQlite myself directly using the native API.
>
> To me, the whole point of the SQL classes like QT has them is that I
> just tell them what I want and leave the internal implementation and
> worries up to them...if I can't do that then what's the point?
>
I've done a lot of stuff with SQLITE (indeed every SQL prototype I've coded
uses it) and never once seen that error. Perhaps you could post the code
(or a link) so we can examine the code itself. This will make it far easier
to troubleshoot.
Cheers,
Bill
--
[ signature omitted ]
Message 2 in thread
Hi,
> I went as far as to completely reduce things to Qt API code only. No
> subclassing, nothing.
>
> 1. Open my SQlite database using QSqlDatabase
> 2. Create a treeview with a QSqlQueryModel and a simple select statement
Please post a minimal, compilable example that reproduces the problem.
--
[ signature omitted ]