9 Comments

  1. Dave

    I did everything clear, uninstall, reset simulator.. but still getting same error. It creates EMPTY DB before the sqlite3_open() statement..and I am surprised with that. Any Clue..??

  2. abc

    same problem,
    did all the things,
    deleted app from simulator, cleaned all the targets, deleted reference , made newer reference .. then also m facing the same thing,
    in this case it got suddenly stopped .
    i havent updated DB schema..

  3. @abc If you delete the app from the simulator that should remove any databases. Then make sure that your database is bundled with your app and then you’re opening that database without any typos like I did.

    You can always run “SELECT name FROM sqlite_master WHERE type = ‘table’” and check if there is anything in your database. If not either your bundled DB is empty, the OS is caching an empty version, or you’re not selecting the right DB name.

  4. mcnus

    Thanks a lot!! Your answer helped me fix this problem in like a matter of minutes(spent only an hour on this problem) and yea, there aren’t much answers about this problem

  5. Wally Waliany

    Same problem but after 3 days of struggling with this problem I came across your post which solved my problem in 10 seconds. Thanks a lot.

  6. Abdulaziz Alhomaidhi

    I have the same problem. I’ve downloaded a complete Xcode project which worked perfectly. However, I needed more columns in the table, so what I did was I created a new database and created a new table. Then I edited the code by replacing the original database and table by the once I created. Here my problem started. Even if I replace the database and table I have created by the original once, i still get the message “no such table: table_name”
    I have deleted the app from simulator, deleted the database i created from my MAC and even i rest my simulator.
    WHAT CAN I DO PLEASE?

Leave a Reply

Your email address will not be published. Required fields are marked *