ThePuiu Active Member Licensed User Longtime User Jun 25, 2019 #1 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: Code: Copy If mySQL.IsInitialized = False Then mySQL.Initialize(File.DirDocuments, "database.db3", False) End If database.db3 file is on Files folder. Thank you!
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: Code: Copy If mySQL.IsInitialized = False Then mySQL.Initialize(File.DirDocuments, "database.db3", False) End If database.db3 file is on Files folder. Thank you!
Erel B4X founder Staff member Licensed User Longtime User Jun 26, 2019 #2 Code: Copy If File.Exists(File.DirDocuments, "database.db3") = False Then File.Copy(File.DirAssets, "database.db3", File.DirDocuments, "database.db3") End If mySQL.Initialize(...) Upvote 0
Code: Copy If File.Exists(File.DirDocuments, "database.db3") = False Then File.Copy(File.DirAssets, "database.db3", File.DirDocuments, "database.db3") End If mySQL.Initialize(...)
ThePuiu Active Member Licensed User Longtime User Jun 26, 2019 #3 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) Upvote 0
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)
Erel B4X founder Staff member Licensed User Longtime User Jun 26, 2019 #4 Sorry but you do need to start a new thread for a new question. Otherwise all threads will become endless discussions about similar topics. Upvote 0
Sorry but you do need to start a new thread for a new question. Otherwise all threads will become endless discussions about similar topics.