I'm trying to read a sqlite-File into memory for better performance, when closing my application I want to write it back to hdd.
I'm using the jdbc (3.7.2) driver in Java.
According to the docs, my Code looks like
this._conn = DriverManager.getConnection("jdbc:sqlite:");
Statement stat = this._conn.createStatement();
File dbFile = new File(this._config.GetDataBaseFile());
if (dbFile.exists()) {
this._logger.AddInfo("File exists.");
stat.executeUpdate("restore from " + dbFile.getAbsolutePath());
}
The file exists (and its a valid sqlite db), this._conn
is open, but if I want to execute statements on it, it appears that there is no table nor data inside. It seems it doesn't restore anything.
Any suggestions on how to solve/debug that further?
(by the way - if I use stat.executeUpdate("backup to test.db")
on my connection, it backups my empty :memory: db...)