[Qt-interest] Driver not loaded...
Jason H
scorp1us at yahoo.com
Mon Apr 4 23:20:01 CEST 2011
Well, then you should be fine. It is a multi-threaded ap, but only one thread
from one process is accessing the DB, so you should be fine.
Maybe come up with a QMap<String, QVariant> based signal/slot mechanism to post
the rows between threads?
________________________________
From: Eric Clark <eclark at ara.com>
To: "Qt Interest (qt-interest at trolltech.com)" <qt-interest at trolltech.com>
Sent: Mon, April 4, 2011 11:01:28 AM
Subject: Re: [Qt-interest] Driver not loaded...
Yes, I did read that, but I am technically not threading the inserts or selects.
I am just putting them on a separate tread than the GUI so that the GUI does not
lock up during the inserts. I am inserting a lot of data at the same time and it
takes a very long time to do, so I need to give time to the GUI, and the best
approach that I thought of was to put all of the database communication on a
separate thread. However, all of the inserts and selects are done sequentially
on that separate thread. So, even though they are done on a separate thread, the
communication with the database is never done at the same time. Hope this made
sense…
Thanks,
Eric
From:Jason H [mailto:scorp1us at yahoo.com]
Sent: Monday, April 04, 2011 9:43 AM
To: Eric Clark; Qt Interest <(qt-interest at trolltech.com)>
Subject: Re: [Qt-interest] Driver not loaded...
Sqlite has the anti-thread documentation. Paraphrased, "threads are evil"
Sqlite can handle multi-process locking through.
Threading support is left up to the driver.
________________________________
From:Eric Clark <eclark at ara.com>
To: "Qt Interest (qt-interest at trolltech.com)" <qt-interest at trolltech.com>
Sent: Mon, April 4, 2011 10:32:27 AM
Subject: Re: [Qt-interest] Driver not loaded...
I actually did read the section on threads and databases and nowhere in there
does it say anything about the instance of the database having to reside on the
same thread that the database is opened. That is why I suggested they add the
documentation. But, like Scott said, it is probably something different with the
driver, so I could see how it would be difficult to document all databases and
their special characteristics. Thank you for your reply!
Eric
From:qt-interest-bounces+eclark=ara.com at qt.nokia.com
[mailto:qt-interest-bounces+eclark=ara.com at qt.nokia.com] On Behalf Of Andre
Somers
Sent: Saturday, April 02, 2011 2:26 AM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] Driver not loaded...
Op 1-4-2011 22:08, Eric Clark schreef:
Hello All,
I have an application that uses an SqLite Database. I can open the database just
fine, write to it, and read from it without problems in most cases; however,
when I try to open the database on a different thread than the one that it was
created on, I always get an error. And the error always says that the drive ris
not loaded. Can anyone tell me why this is happening? Or what I can do to fix
it? According to the documentation, threading should not be a problem.
There is actually a documentation section about threads and sql databases. You
might want to take a look.
André
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110404/d1f4abbd/attachment.html
More information about the Qt-interest-old
mailing list