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 6382865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:34:43+00:00 2026-05-25T02:34:43+00:00

I am running a SQLite database in memory and I am attempting to drop

  • 0

I am running a SQLite database in memory and I am attempting to drop a table with the following command.

DROP TABLE 'testing' ;

But when I execute the SQL statement, I get this error

SQL logic error or missing database

Before I run the “Drop Table” query I check to make sure that the table exists in the database with this query. So I am pretty sure that the table exists and I have a connection to the database.

SELECT count(*) FROM sqlite_master WHERE type='table' and name='testing';

This database is loaded in to memory from a file database and after I attempt to drop this table the database is saved from memory to the file system. I can then use a third party SQLite utility to view the SQLite file and check to see if the “testing” exists, it does. Using the same 3rd party SQLite utility I am able to run the “Drop TABLE” SQL statement with out error.

I am able to create/update tables without any problems.

My questions:

  • Is there a difference between a memory database and a file database in SQLite when dropping a table?
  • Is there a way to disable the ability to drop a table in SQLite that I may have accentually turned on somehow?

Edit: It appears to have something to do with a locked table. Still investigating.

  • 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-25T02:34:43+00:00Added an answer on May 25, 2026 at 2:34 am

    I had the same problem when using Sqlite with the xerial jbdc driver in the version 3.7.2. and JRE7
    I first listed all the tables with the select command as follows:

    SELECT name FROM sqlite_master WHERE type='table'
    

    And then tried to delete a table like this:

    DROP TABLE IF EXISTS TableName
    

    I was working on a database stored on the file system and so it seems not to effect the outcome.
    I used the IF EXISTS command to avoid listing all the table from the master table first, but I needed the complete table list anyway.

    For me the solution was simply to change the order of the SELECT and DROP.

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

Sidebar

Related Questions

I'm trying to use DbLinq with a SQLite database, but I'm running into a
I've just got my first SQLite database up and running but to reproduce it
I want to drop a table in my SQLite Database file named database.db. After
I have a rails application, running in development mode ( with a sqlite database
I am running a SQLite database within a Perl CGI script which is being
Does anyone have real world experience running a Sqlite database on an SMB share
I'm writing an application for the iPhone that communicates with a SQLite database but
I am running a web application with a backend SQLite database that solely performs
I'm running through a tutorial on how to load data from a SQlite database.
i have been having for SQL trouble, i am using an SQLite database and

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.