Create QSqlQuery, then call prepare

Issue #1130
This commit is contained in:
Craig Drummond
2017-11-28 22:37:01 +00:00
committed by Craig Drummond
parent 6e100a5ef5
commit f322d43899

View File

@@ -453,7 +453,8 @@ public:
if (limit>0) {
sql+=" LIMIT "+QString::number(limit);
}
query=QSqlQuery(sql, db);
query = QSqlQuery(db);
query.prepare(sql);
for (const QVariant &value: boundValues) {
query.addBindValue(value);