I read all the documentation of QSqlQuery and all topics in the net.Unfortunately there are examples only with INSERT or SELECT statement.
I have the code below working:
Qt Code:
  1. QSqlQuery query;
  2. query.prepare("INSERT INTO clients (ClientName, ClientCity, ClientAddress, ClientMol, ClientEik, ClientVat, ClientTel, ClientMail)"
  3. "VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
  4. query.addBindValue(ui->lineEdit_name->text());
  5. query.addBindValue(ui->lineEdit_city->text());
  6. query.addBindValue(ui->lineEdit_address->text());
  7. query.addBindValue(ui->lineEdit_mol->text());
  8. query.addBindValue(ui->lineEdit_eik->text());
  9. query.addBindValue(ui->lineEdit_vat->text());
  10. query.addBindValue(ui->lineEdit_tel->text());
  11. query.addBindValue(ui->lineEdit_mail->text());
  12. query.exec();
To copy to clipboard, switch view to plain text mode 

What i need is the same but with UPDATE and as condition WHERE ROWID=rowid
I don't know where to put this WHERE and where the value of rowid.I have tried a lot.