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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:43:33+00:00 2026-06-12T03:43:33+00:00

I have one sqlite database file and I am not able to read and

  • 0

I have one sqlite database file and I am not able to read and write on this database file.
I am using this code:

fileIsExists = new File(Environment.getExternalStorageDirectory()
            + "/bbmp/bbmp2.sqlite");
    if (fileIsExists.exists()) {
db = SQLiteDatabase.openDatabase(fileIsExists.toString(), null,
                 SQLiteDatabase.OPEN_READWRITE);        
}

This throw following error:

10-01 17:09:17.343: E/Database(9216): DELETE failed setting locale

10-01 17:09:17.374: E/Database(9216): Failed to setLocale() when constructing, closing the database

10-01 17:09:17.374: E/Database(9216): android.database.sqlite.SQLiteException: attempt to write a readonly database

10-01 17:09:17.374: E/Database(9216):   at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)

10-01 17:09:17.374: E/Database(9216):   at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1987)

10-01 17:09:17.374: E/Database(9216):   at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1855)

10-01 17:09:17.374: E/Database(9216):   at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)

10-01 17:09:17.374: E/Database(9216):   at com.pixel.bbmp2.Bbmp2Activity.checkDirectory(Bbmp2Activity.java:150)

10-01 17:09:17.374: E/Database(9216):   at com.pixel.bbmp2.Bbmp2Activity.onCreate(Bbmp2Activity.java:115)

10-01 17:09:17.374: E/Database(9216):   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)

10-01 17:09:17.374: E/Database(9216):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)

10-01 17:09:17.374: E/Database(9216):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)

10-01 17:09:17.374: E/Database(9216):   at android.app.ActivityThread.access$1500(ActivityThread.java:117)

10-01 17:09:17.374: E/Database(9216):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)

10-01 17:09:17.374: E/Database(9216):   at android.os.Handler.dispatchMessage(Handler.java:99)

10-01 17:09:17.374: E/Database(9216):   at android.os.Looper.loop(Looper.java:123)

10-01 17:09:17.374: E/Database(9216):   at android.app.ActivityThread.main(ActivityThread.java:3683)

10-01 17:09:17.374: E/Database(9216):   at java.lang.reflect.Method.invokeNative(Native Method)

10-01 17:09:17.374: E/Database(9216):   at java.lang.reflect.Method.invoke(Method.java:507)

10-01 17:09:17.374: E/Database(9216):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)

10-01 17:09:17.374: E/Database(9216):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

10-01 17:09:17.374: E/Database(9216):   at dalvik.system.NativeStart.main(Native Method)

Following table are there in database file
enter image description here

What I need to do here ?????

  • 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-12T03:43:34+00:00Added an answer on June 12, 2026 at 3:43 am

    You are trying to open a read only database in write mode. You can check the code for opening the database in read only mode here Could someone explain what this line does?

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

Sidebar

Related Questions

I have a database file that is generated on a PC using Sqlite. This
I have to insert 8000+ records into a SQLite database using Django's ORM. This
If you want to pre-populate a database (SQLite) in Android, this is not that
I'm using sqlite in an IPhone app for a readonly database. One use case
I'm new to the Android SQLite whole thing. This is what I have: I
I am using System.Data.Sqlite to access SQLite database in C#. I have a query
I have a sqlite database that I did not create myself but from a
I want to read all rows in a table using system.data.sqlite. As I have
I was learning Core Data and previously I have used SQLite in one of
I have two references to a SQLite assembly, one for 32-bit and one for

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.