Hi,
My app uses keyvaluestore and I have enabled the wal mode for faster loading speed and multithread reading by add the code below in keyvaluestore's initialize sub:
It works well in windows, but crashed in OS X. I got this error:
Database created by OS X works fine. But sqlite is not in wal mode.
I have attached the database created under windows.
My app uses keyvaluestore and I have enabled the wal mode for faster loading speed and multithread reading by add the code below in keyvaluestore's initialize sub:
B4X:
sql1.ExecNonQuery("PRAGMA journal_mode = wal")
It works well in windows, but crashed in OS X. I got this error:
B4X:
java.sql.SQLException: [SQLITE_NOTADB] File opened that is not a database file (file is encrypted or is not a database)
at org.sqlite.DB.newSQLException(DB.java:383)
at org.sqlite.DB.newSQLException(DB.java:387)
at org.sqlite.DB.throwex(DB.java:374)
at org.sqlite.NestedDB.prepare(NestedDB.java:134)
at org.sqlite.DB.prepare(DB.java:123)
at org.sqlite.Stmt.execute(Stmt.java:113)
at anywheresoftware.b4j.objects.SQL.ExecNonQuery(SQL.java:156)
at b4j.example.keyvaluestore._createtable(keyvaluestore.java:62)
at b4j.example.keyvaluestore._initialize(keyvaluestore.java:357)
at b4j.example.tm._initialize(tm.java:1342)
at b4j.example.project._initializetm(project.java:706)
at b4j.example.project._open(project.java:826)
at b4j.example.main._menubar1_action(main.java:487)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.BA$1.run(BA.java:215)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Database created by OS X works fine. But sqlite is not in wal mode.
I have attached the database created under windows.