Hi to all, i'm trying to initialize a db in File.dirInternal (copied from assets) but i got this error:
This is the code i use:
I think is right because is a shared sub that I use in all my projects... So i don't understand the issue.
File in assets exists. Also in DirInternal.. I know i can use DBUtils to copy file, but i need to understand why i'm getting this error
Thanks to all
B4X:
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database
This is the code i use:
B4X:
If File.Exists(File.DirInternal,DB_NAME) Then
sqlManager.Initialize(File.DirInternal,DB_NAME,False)
Else
File.Copy(File.DirAssets,DB_NAME,File.DirInternal,DB_NAME)
sqlManager.Initialize(File.DirInternal,DB_NAME,False)
End If
I think is right because is a shared sub that I use in all my projects... So i don't understand the issue.
File in assets exists. Also in DirInternal.. I know i can use DBUtils to copy file, but i need to understand why i'm getting this error
Thanks to all