View Full Version : SQLite3 Database Not Refreshing
Apr 13, 2009, 10:30 AM
I have an sqlite3 database in my iPhone app. This is my first iPhone app and my first time using the iPhone SDK. I have edited the database outside of the program using the terminal sqlite3 commands. I can see the changes in the terminal, but my program isn't picking them up. It is still returning the old values. Is there something I need to do to flush the cache or something so it picks up the changes?
Apr 14, 2009, 11:39 AM
You give a paucity of information. Is this in the simulator? on the iPhone? Did you delete the old copy of the app from whatever it was? Did you do a clean all targets before you recompiled?
Apr 14, 2009, 03:25 PM
I've never used SQLite, but other SQL databases usually require one to "commit" the changes. That is an SQL command to save your changes.
Apr 15, 2009, 03:30 PM
I figured it out. I had the database stored in my project folder and that's where I was updating it. The program, however, was looking for it in the documentsDirectory. It copied it there automatically at one point, but it wasn't refreshing it most likely because of my lack of experience! So... I updated it manually and all is well!