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

  • SEARCH
  • Home
  • 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 9108441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:48:34+00:00 2026-06-17T02:48:34+00:00

I have an android application that uses a database created by SQLite Database Browser

  • 0

I have an android application that uses a database created by SQLite Database Browser as shown in this blog: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

First, I created a database with two tables with one of those tables with one entry, just to check if I was getting the database creation correctly. This worked.

After that, I populated one of the tables with 10 more entries, saved, then copied the database to the assets folder (overwriting the previous one), ran the application, and then queried the 2nd – 10th entries. The application was force closing giving me the CursorIndexOutOfBounds error.

From this, I inferred that the application was somehow unable to use the new database I created and was still using the old one (that was overwritten).

Is there a way to get around and/or fix this? The application seems to be using the first version of the database it receives, even if that database is overwritten by a new one.

  • 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-06-17T02:48:35+00:00Added an answer on June 17, 2026 at 2:48 am

    It sounds like your first DB, the one with only a single entry, still exists in your app’s database folder under /data/data/your-package-name (on your android device). That tutorial’s code will only copy the database from the assets folder if the database does not exist on the device (look at the checkDataBase() method in the tutorial). So, delete the database from the /data/data/your-package-name (either with code or with root access), make sure your updated DB file is in the assets folder, and then run it again. That will ensure the DB from the assets folder is copied onto the device.

    Also, make sure the DB_PATH is equal to context.getApplicationInfo().dataDir + "/databases/" instead of "/data/data/YOUR_PACKAGE/databases/".

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

Sidebar

Related Questions

I have written a simple Android application that uses a sqlite database which is
Currently I have developed an android application that uses a local sqlite database per
I have written an Android application that uses SQLite database which is saved in
I have an Android application that uses the Android database to create tables and
I have a Web Service and an Android application that uses this web service.
I have an Android library project and the main application that uses this library
I have created an android application that uses android-support-v4.jar . Now when I add
I'm working on an application which uses SQLite Database on Android.I have a custom
I have a simple Android application that uses a JAR I have built. When
I am building an android application that uses several third party libraries. I have

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.