Actually I've discovered that the following works!
query.prepare("INSERT INTO INSERT INTO people(ID,Name,Age) VALUES (?, ?, ?)");
query.addBindValue(1);
query.addBindValue("Fred Bloggs");
query.addBindValue(21);
query.exec();
model->setQuery("SELECT * FROM clients ORDER BY clientName");
QSqlQuery query;
query.prepare("INSERT INTO INSERT INTO people(ID,Name,Age) VALUES (?, ?, ?)");
query.addBindValue(1);
query.addBindValue("Fred Bloggs");
query.addBindValue(21);
query.exec();
model->setQuery("SELECT * FROM clients ORDER BY clientName");
To copy to clipboard, switch view to plain text mode
Bookmarks