I'm trying to read records from a a local SQLite database.
In the simulator goes, but on the iPhone does not, the error message is "Database file not found."
Someone can help me with a small example ("a good practice guide"), how to check if there is a database or otherwise how to copy it.
Used code:
B4X:
If mySQL.IsInitialized = False Then
mySQL.Initialize(File.DirDocuments, "database.db3", False)
End If
If File.Exists(File.DirDocuments, "database.db3") = False Then
File.Copy(File.DirAssets, "database.db3", File.DirDocuments, "database.db3")
End If
mySQL.Initialize(...)
Also related to this topic ... if the structure or content of the database changed, how to be copied instead of the old one? (without deleting the old one manually)