Problems using sql bindvalue in QT 5.1
-
wrote on 2 Aug 2013, 13:56 last edited by
the code below works in qt 4.8
@
QSqlQuery query(db);
qint32 id = 1;
query.prepare(QString("SELECT image_id, name FROM backgrounds WHERE id = :id"));
query.bindValue("id", id);
query.exec();
@the “query.executedQuery()” return “SELECT image_id, name FROM backgrounds WHERE id = ?”
instead "SELECT image_id, name FROM backgrounds WHERE id = 1" -
Hi,
This sounds like a bug, did you check the "bug report system":bugreports.qt-project.org/issues/ ?
If nothing's there you can try to ask on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented) and maybe open a bug report (don't forget to add you OS, Qt versions etc...)
2/2