void MainWindow::startUpload(int ID, QString NAME) { qDebug() << ID; qDebug() << NAME; QSqlRecord recordAddFilePath = model->record(); recordAddFilePath.setValue(model->fieldIndex("file_path"),NAME); qDebug() << "filling Attach fielepath" << model->insertRecord(ID,recordAddFilePath); } in this situation adds a new row to the table, and I need to have changes in the current row (ID)