I am trying to read sqlite-File in memory for better performance, when closing my application I want to write it back to hdd.
I am using jdbc driver (3.7.2) 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 valid sqlite db), this._conn open, but if I want to execute instructions on it, it seems that there is no table and data inside. It does not seem to restore anything.
Any suggestions for further solution / debugging?
(by the way - if I use stat.executeUpdate("backup to test.db") in my connection, it creates a backup of my empty: memory: db ...)
source share