[email protected]
[Top] [All Lists]

Re: QSqlDatabase threadsafe? (MySQL, Multithreading, Database, QSqlDatab

Subject: Re: QSqlDatabase threadsafe? MySQL, Multithreading, Database, QSqlDatabase, QThread
From: Jan Pool
Date: Wed, 10 Nov 2004 13:05:17 +0200

Thanx for your quick answer!
The way I tried it first, was your second suggestion. The connection in the main thread was the default connection,
"connectionName" not specified. In the second thread I specified a
different connection name.
The program crashed anyway on the second thread issuing "UPDATE" statments
("SELECT" worked fine).

Or do you think, specfying "connectionName" explicitly in BOTH threads might
Don't think that will make a difference. As long as the two connection names are not the same.

Does the two threads operate on the same table concurrently?

And as for option 1: Speed of db access does matter very much in my code... but I think I nevertheless have to look into that Mutex-thing.

Again thanx,

Jan Pool
Stone Three Signal Processing (Pty) Ltd
Tel: +27-21-8513123
Fax: +27-21-8513127
WWW: http://www.stonethree.com

Today's mighty oak is just yesterday's nut that held its ground.

List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>