Location of database and csv files

devlei

Active Member
Licensed User
Longtime User
I am struggling to get B4A to open and read existing sqlite and csv files, and I suspect it has to do with their location.

From the "Text Files" documentation in the "Getting Started & Tutorials" forum, I can see that for File.DirDefaultExternal the location is
<storage card>/Android/data/<package>/files/.

But where is this on my desktop computer?
 

devlei

Active Member
Licensed User
Longtime User
Thanks for the response, Erel.

Where do I place any existing sqlite or csv files that I want my B4A app to read?
 
Upvote 0

devlei

Active Member
Licensed User
Longtime User
Thanks, I used DBUtils.CopyDBFromAssetsFolder to copy the file to File.DirDefaultExternal and was able to access the data.

Now I have added and edited data, but the next time I run the app I am back to the same old problem of it not being able open the file in the File.DirDefaultExternal location.

How do I open this updated database file when I run the app again?
 
Upvote 0

devlei

Active Member
Licensed User
Longtime User
Thanks, Klaus.

I am just busy going through your SQLiteDB example and hopefully that will help me resolve this issue. If not, I will post again.
 
Upvote 0

devlei

Active Member
Licensed User
Longtime User
It seems like the SQLiteDB example uses Files.DirInternal.

The problem with that for my app is that I need to be able to synchronise the sqlite db from the device with the desktop as there is a companion desktop app that also needs to access that same sqlite db.

Any suggestions on how to achieve that?
 
Upvote 0

devlei

Active Member
Licensed User
Longtime User
I will try that.

If I use the Files.DirRootExternal, in what folder do I place my existing sqlite db during development using the emulator?
 
Upvote 0
Top