[Qt-interest] qtsql simultaneous queries to db

Jan janusius at gmx.net
Thu Feb 11 22:35:50 CET 2010


Jason H schrieb:
> This really depends on your driver. 
> 
> I know SQLITE won't allow it - you have to connect to a different db file, all connections to a single db file will be forced to one. 

I am doing this all the time with sqlite.

Jan






> 
> 
> 
> 
> ----- Original Message ----
> From: franki <franki at franki.eu.org>
> To: QT Mailing LIST <qt-interest at trolltech.com>
> Sent: Thu, February 11, 2010 11:14:41 AM
> Subject: [Qt-interest] qtsql simultaneous queries to db
> 
> Hi,
> 
> I need to run another query, during fetching result from QSqlQuery, something 
> like this:
> 
> q=QSqlQuery;
> q.exec("select somethig from table");
> while(q.next()) {
>     // need run another query to calculate some values
>     //....
> }
> 
> Is it possible with one connection to db? For example to create another 
> QSqlQuery object and call q1.exec() and so one, during reading from previous 
> QSqlQuery? 
> Or do I need separate connections to run simultaneously queries?
> 
> I have qt4.5 and postgresql 8.1
> 
> Greetings
> Marek
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 
> 
> 
>       
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 



More information about the Qt-interest-old mailing list