Hi Folks,
A hopefully simple question!
With QSqlQuery a database can be updated with bound values eg:
query.prepare("INSERT INTO people(ID,Name,Age) "
"VALUES (?, ?, ?)");
query.addBindValue(1);
query.addBindValue("Fred Bloggs");
query.addBindValue(21);
query.exec();
QSqlQuery query;
query.prepare("INSERT INTO people(ID,Name,Age) "
"VALUES (?, ?, ?)");
query.addBindValue(1);
query.addBindValue("Fred Bloggs");
query.addBindValue(21);
query.exec();
To copy to clipboard, switch view to plain text mode
How is this done with a QSqlQueryModel ?
Thanks
Bookmarks