Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.12.5
-
None
Description
When setting the application_id header field of an SQLite database using "PRAGMA application_id", one can't use bind values.
Executing a query via a literal request works as expected. if you do
QSqlQuery query(m_db);
query.exec(QStringLiteral("PRAGMA application_id = 123"));
the header field is set, one can query it via "PRAGMA application_id" and e. g. file shows it on the console.
When I try to use a bind value like so:
constexpr int APPLICATION_ID = 123;
QSqlQuery query(m_db);
query.prepare(QStringLiteral("PRAGMA application_id = ?"));
query.bindValue(0, APPLICATION_ID);
query.exec();
the query fails with query.lastError() showing an empty databaseText and driverText set to "Parameter count mismatch".