[Qt-interest] Multiple Prepare in QtSql
Dan White
ygor at comcast.net
Wed Oct 28 17:13:30 CET 2009
How about :
QSqlQuery q1, q2, q3, q4, q5, q6, q7, q8 ;
Or some equivalent ?
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)
----- Original Message -----
From: Will Rutherdale (rutherw) <rutherw at cisco.com>
To: qt-interest at trolltech.com
Sent: Wed, 28 Oct 2009 15:26:28 +0000 (UTC)
Subject: [Qt-interest] Multiple Prepare in QtSql
Hi.
In Qt 4.5, the QSqlQuery class in the QtSql module contains a prepare()
method. I have tried it (against an SQLite database) and found it
worked fine. However, it only gives one handle.
>From my experience with various RDBMSs (database systems), and from
years of experience using the Perl DBI library, I am used to being able
to issue multiple prepare statements. In the Perl DBI interface, you
are given a statement handle for each prepare statement, and you call
execute() against each statement handle. Multiple statement handles can
be open at the same time.
In QSqlQuery it is different. The prepare() method only returns bool,
not a statement handle. As far as I can tell this means that I can only
have one open statement handle at a time. With one use case I am
looking at this is a severe limitation, as I ideally want to have eight
statement handles open at a time.
Does anybody know if there is a way around this limitation? Will Qt 4.6
address this problem?
-Will
_______________________________________________
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