SQLite3 Database Not Refreshing

Discussion in 'iPhone/iPad Programming' started by danmwall, Apr 13, 2009.

  1. macrumors newbie

    Joined:
    Apr 13, 2009
    Messages:
    17
    #1
    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. macrumors regular

    Joined:
    Jun 18, 2008
    Messages:
    190
    #2
    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. macrumors 6502

    Joined:
    Mar 8, 2009
    Messages:
    276
    Location:
    Denver, CO
    #3
    commit?

    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. macrumors newbie

    Joined:
    Apr 13, 2009
    Messages:
    17
    #4
    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!

    Thanks!
     

Share This Page