Android Question Database question

anaylor01

Well-Known Member
Licensed User
Longtime User
Certain records in certain tables were being deleted and determined the code below was doing it. Can someone explain to me exactly how it works?
B4X:
'    File.Delete(File.DirDefaultExternal, dbfilename)
'    File.Delete(File.DirInternal, dbfilename)
 

anaylor01

Well-Known Member
Licensed User
Longtime User
That is what I thought but the database was always there and working. The only thing different was records were missing
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
That is what I thought but the database was always there and working. The only thing different was records were missing
Those lines delete the DBs in:
File.DirDefaultExternal
File.DirInternal

You are working on the DB you initialized passing a path.

I have read many times questions like this; often the programmer has an error during initialization of the db (he checks the existence of the DB file, he wants to replace it with a new version, etc).
 
Upvote 0

anaylor01

Well-Known Member
Licensed User
Longtime User
Here is what it HAS to be. There are two copies of the database. It's the only explanation. I was thinking the only copy was the db under the Files folder but there has to be one in the emulator.
 
Upvote 0
Top