HI Guys
I have this code in activity_create
this will copy the file if not exists and allow the user to update records
I've changed the tx.db and add a new table.
Now the program won't copy it again, because it already exists.
So my work around were this:
Which means a new DB is copy, AND all the users data has been erased with a new db
What better way is there to use new tables added to DB, and create that tables without erase previous data
Thanks, appreciate
Danie
I have this code in activity_create
B4X:
If File.Exists(File.DirInternal,"tx.sql") = False Then
File.Copy(File.DirAssets,"tx.sql",File.DirInternal,"tx.sql")
End If
this will copy the file if not exists and allow the user to update records
I've changed the tx.db and add a new table.
Now the program won't copy it again, because it already exists.
So my work around were this:
B4X:
If File.Exists(File.DirRootExternal,"dbflag.txt")=True Then
If File.Exists(File.DirInternal,"tx.sql") = False Then
File.Copy(File.DirAssets,"tx.sql",File.DirInternal,"tx.sql")
End If
Else
File.WriteString(File.DirRootExternal, "dbflag.txt","")
File.Copy(File.DirAssets,"tx.sql",File.DirInternal,"tx.sql")
End If
End If
What better way is there to use new tables added to DB, and create that tables without erase previous data
Thanks, appreciate
Danie
Last edited: