trouble including a database with install of app

sorheim

Member
Licensed User
Longtime User
Hello,

I am working on a program that uses a small database. I have added it to the files in the project and when I look in the apk file, it is there under the assets folder and the size of 6K is correct.

When I look at the the file in File.DirInternal after the app is installed on my device, it is there but the size is 0K - it contains none of the tables or records that exist in the copy that is in the assets folder in the apk.

Any help would be greatly appreciated.


Thanks,

Scott Orheim
 

mc73

Well-Known Member
Licensed User
Longtime User
Do you copy your db with something like this?
B4X:
If File.Exists (File.DirDefaultExternal ,"YOUR.db") = False Then
File.Copy(File.DirAssets,"YOUR.db",File.DirDefaultExternal ,"YOUR.db")
end if

I am using dirDefaultExternal, but certainly you can alter it to the directory of your choice.
Another reason could be, that you still upload your original db, without firstly reinserting the edited one in the files tab of your project.
 
Upvote 0
Top