SQLite3 Database Not Refreshing

Discussion in 'iOS Programming' started by danmwall, Apr 13, 2009.

  1. danmwall macrumors newbie

    Apr 13, 2009
    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?
  2. ghayenga macrumors regular

    Jun 18, 2008
    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?
  3. jpyc7 macrumors 6502

    Mar 8, 2009
    Denver, CO

    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.
  4. danmwall thread starter macrumors newbie

    Apr 13, 2009
    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!


Share This Page