Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6896325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:01:29+00:00 2026-05-27T07:01:29+00:00

I want to drop a table in my SQLite Database file named database.db. After

  • 0

I want to drop a table in my SQLite Database file named database.db. After using

NSLog(@"i show up in the console");
[db executeUpdate:@"DROP TABLE IF EXISTS `article`;"];
NSLog(@"i will not show up in the console");

the app stops at the position of the query. NSLog before the query is shown in console. NSlog directly after the query does not show up in the console window. Additionally a temporary file called database.db-journal is created and deleted continuously in the simulator app folder while the app is running. The app does NOT crash, does not giving any error and does not continue… Removing “IF EXISTS” in the query doesn’t work, removing backticks doesn’t work, removing semicolon doesn’t work.
Enabling tracing of query only shows that FMDB is processing my query, nothing more shows up.

I’m really confused why this happens. I thought that the table has to be empty before it can be dropped and so I added a query to delete every record in it. But id doesn’t matter, the app is still getting caught at the drop-query. Im running out of possibilities to resolve this error.
If I execute the drop command within SQLite Database Browser 2 everything works fine.

Further researches with the debugger showed that FMDB wrapper is going into an infinity loop because the return value of the statement equals to the SQLITE_LOCKED constant which means that the table I want to drop is locked. Sending “UNLOCK TABLES” in a previous query doesn’t solve this. Why the table is locked? Why deleting records from a locked table will work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:01:30+00:00Added an answer on May 27, 2026 at 7:01 am

    I had the same issue, and got it solved by calling closeOpenResultSets on the FMDB instance just before the update, just like TRD said (though I didn’t have to close and reopen the database completely)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to remove all rows that i entered from my SQLite database table.
I want to delete or add column in sqlite database I am using following
I'm using sql2000 and I want to automatically drop a #temp table in a
I want to create a table in a SQLite database only if doesn't exist
I want to drop a now supposedly redundant file in SQL Server (2005), but
I have a large (multi-GB) data file exported from an Oracle table. I want
I want to drop a table but it is referenced by one or more
I want my SQLite database instance to be wiped away when the program starts.
I have a table and I want to drop or set the default value
I want to insert data in MYSQL database using python here my code import

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.