Hello, hope you are fine.
At present I have a probleme that I did not have before updating b4a suite to 11.20. and I need professional help.
I run the app on my real device and on emulator and checked with a filemanger that the database file is copied and resists in the directory - it does!
I am not able to initialize/open the database. By the way I did not change the Database Version.
Next I tried t copy the database file manually with file.copy and by using xui,DefaultFolder same problem.
I got this error message as followes:
Logger verbunden mit: HUAWEI CLT-L29
--------- beginning of crash
--------- beginning of system
--------- beginning of main
Copying updated assets files (24)
*** Service (starter) Create ***
Error occurred on line: 56 (Starter)
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (Sqlite code 14): Could not open database, (OS error - 2:No such file or directory)
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:225)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:541)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:209)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:198)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:936)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:923)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:821)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:770)
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:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at FDM.Prof.starter.onCreate(starter.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3795)
at android.app.ActivityThread.-wrap5(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1984)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7367)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Thank you for assistance and responding.
At present I have a probleme that I did not have before updating b4a suite to 11.20. and I need professional help.
starter/sub service_create:
Sub Process_Globals
Public SQLite As SQL ' Database object Sqlite Version 3
End Sub
Sub Service_Create
Try
' # copy Database to accessable directory and open database
DBUtils.CopyDBFromAssets("FDM.db")
if file.exists(DBUtils.GetDBFolder,"FDM.db") then
SQLite.Initialize(DBUtils.GetDBFolder,"FDM.db",false)
end if
Catch
xui.Msgbox2Async("Datenbank nicht geöffnet!" & CRLF & CRLF & LastException, _
"10: Datenbankfehler","OK","","",Main.imgError)
End Try
End Sub
I am not able to initialize/open the database. By the way I did not change the Database Version.
Next I tried t copy the database file manually with file.copy and by using xui,DefaultFolder same problem.
I got this error message as followes:
Logger verbunden mit: HUAWEI CLT-L29
--------- beginning of crash
--------- beginning of system
--------- beginning of main
Copying updated assets files (24)
*** Service (starter) Create ***
Error occurred on line: 56 (Starter)
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (Sqlite code 14): Could not open database, (OS error - 2:No such file or directory)
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:225)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:541)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:209)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:198)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:936)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:923)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:821)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:770)
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:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at FDM.Prof.starter.onCreate(starter.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3795)
at android.app.ActivityThread.-wrap5(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1984)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7367)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Thank you for assistance and responding.