Android Question SQL.Initialize: error code 1294

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
Hi all,
I'm writing an app using SQLite.
Daily I uninstall the app and reinstall.
I need to use DirDefaultExternal to verify my DB (Tables and Records)
Storage is 66% free
Suddenly I have an error:

B4X:
** Activity (main) Create, isFirst = true **
Cerco DB
File.ExternalWritable true
main_activity_create (java line: 447)
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)
#################################################################

These are the statements:
B4X:
'   Log ("File.ExternalWritable " & File.ExternalWritable)
   If File.Exists(File.DirDefaultExternal,"slimup.db") = False Then
       Log("Creo")
       SQL1.Initialize(File.DirDefaultExternal, "slimup.db", True)

I don't know how solve.
Can someone help me?
Thanks
Marcom
 

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
Seems solved.
The tablet had taken away memory permissions
I think it happened for test errors
Thanks all
 

Attachments

  • Screenshot_20190522-174227_Settings.jpg
    Screenshot_20190522-174227_Settings.jpg
    169.7 KB · Views: 361
Upvote 0
Top