I never encountered such case.
Tip: if you are always starting with an existing db then better to set the last parameter in SQL.Initialize to False. You don't want to create a new db.
What happens if you overwrite the existing file - comment line 11?
How did you create the db file? With the default journal mode - WAL, the db consists of 3 files.
db was created with sqlite studio
I changed the parameter to false
i made a test , first i deleted all pos.* file, than i copied again
here is the code
here is the log
true
FileName: virtual_assets FileSize : 4096
FileName: pos.db FileSize : 303104
/data/user/0/POS.app/files
FileName: virtual_assets FileSize : 4096
FileName: pos.db FileSize : 303104
true
Error occurred on line: 84 (B4XMainPage)
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 1294): Could not open database
#################################################################
Error Code : 1294 (SQLITE_CANTOPEN_ENOENT)
Caused By : Specified directory or database file does not exist.
(unknown error (code 1294): Could not open database)
#################################################################
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:242)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:203)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:518)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:209)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:181)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1167)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1115)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:832)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:807)
at anywheresoftware.b4a.sql.SQL.Initialize(SQL.java:44)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)