"SQL logic error or missing database Error opening database"
-
I'm trying to incorporate a database within the application, by changing the offlinestorage path. So far i've successfully made it work on the simulator but when i run it on a device i'm getting the following error: "SQL logic error or missing database Error opening database".
Has this happened to someone else?Thank you.
-
So it happens i was using the same path for both simulator and device, which is not correct.
I can access the database with:@#ifdef Q_WS_SIMULATOR
viewer.engine()->setOfflineStoragePath(<PATH>);
#else
QString privatePathQt(QApplication::applicationDirPath());
QString pathOfflineStorage(privatePathQt);
pathOfflineStorage.append(QDir::separator()).append(<PATH>);
pathOfflineStorage = QDir::toNativeSeparators(pathOfflineStorage);
viewer.engine()->setOfflineStoragePath(pathOfflineStorage);
#endif@Now i can access it but i can't edit it permanently.
I run it in the simulator, make some changes in a table and when i restart it the changes are not saved.