'
If File.Exists(File.DirDefaultExternal,"dbfile.db3") = False Then
File.Copy(File.DirAssets,"dbfile.db3",File.DirDefaultExternal,"dbfile.db3")
Log ("Main.FirstTime -- Database file copied")
End If
'
' Open the DataBase
If Routine.Open_DataBase(File.DirDefaultExternal, "dbfile.db3") = True Then
I use the following code:
B4X:' If File.Exists(File.DirDefaultExternal,"dbfile.db3") = False Then File.Copy(File.DirAssets,"dbfile.db3",File.DirDefaultExternal,"dbfile.db3") Log ("Main.FirstTime -- Database file copied") End If ' ' Open the DataBase If Routine.Open_DataBase(File.DirDefaultExternal, "dbfile.db3") = True Then
And I never saw in the log: "Database file copied"... so... you can use the database specified in the app.
Regards,
Edgar
File.DirInternal is not read-only. You can use it for any database. Only File.DirAssets (which is not a real folder) is read-only and cannot be used for any database.