Why does it show me this Error when saving backup, in Qt and sqlite3
-
I have the following code, I want to save a backup from Qt using the sqlite .backup command, but it shows me this error, and the file is not created.
QObject::connect(ui->actionHacer_backup, &QAction::triggered, this, [&](){ QProcess process; QStringList argv{}; QString app{"sqlite3.exe"}; auto db = qApp->applicationDirPath().append("/xxxdatabase/xdatabase.db"); auto file_savePath = QFileDialog::getSaveFileName(this, "save a backup",QDir::rootPath(), "Archivo backup (*.bak)"); if(file_savePath.isEmpty()) return; argv << db << ".backup" << file_savePath; if(process.startDetached(app, argv)){ qInfo() << "Backup creado!!"; } });
Any recommendation would be good.
-
I have the following code, I want to save a backup from Qt using the sqlite .backup command, but it shows me this error, and the file is not created.
QObject::connect(ui->actionHacer_backup, &QAction::triggered, this, [&](){ QProcess process; QStringList argv{}; QString app{"sqlite3.exe"}; auto db = qApp->applicationDirPath().append("/xxxdatabase/xdatabase.db"); auto file_savePath = QFileDialog::getSaveFileName(this, "save a backup",QDir::rootPath(), "Archivo backup (*.bak)"); if(file_savePath.isEmpty()) return; argv << db << ".backup" << file_savePath; if(process.startDetached(app, argv)){ qInfo() << "Backup creado!!"; } });
Any recommendation would be good.
Because according to so it's
sqlite3 test.db ".backup backup.db"
and notsqlite3 test.db .backup backup.db
-
L lincoln has marked this topic as solved on
-
Because according to so it's
sqlite3 test.db ".backup backup.db"
and notsqlite3 test.db .backup backup.db
@Christian-Ehrlicher Thanks