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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:32:40+00:00 2026-06-03T07:32:40+00:00

Here is my project Here I want to insert something into my database. I

  • 0

Here is my project

Here I want to insert something into my database. I also used this link
as reference but tht goes in vain.

But here is the error-log I have.

05-04 16:53:20.272: E/AndroidRuntime(18378): FATAL EXCEPTION: main
05-04 16:53:20.272: E/AndroidRuntime(18378): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.crews.databaseproto.activity/com.crews.databaseproto.activity.DatabaseProtoActivity}: java.lang.IllegalStateException: database not open
05-04 16:53:20.272: E/AndroidRuntime(18378):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at android.app.ActivityThread.access$1500(ActivityThread.java:117)  
05-04 16:53:20.272: E/AndroidRuntime(18378):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at android.os.Handler.dispatchMessage(Handler.java:99)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at android.os.Looper.loop(Looper.java:130)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at android.app.ActivityThread.main(ActivityThread.java:3687)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at java.lang.reflect.Method.invokeNative(Native Method)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at java.lang.reflect.Method.invoke(Method.java:507)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at dalvik.system.NativeStart.main(Native Method)
05-04 16:53:20.272: E/AndroidRuntime(18378): Caused by: java.lang.IllegalStateException: database not open
05-04 16:53:20.272: E/AndroidRuntime(18378):    at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:555)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at com.crews.databaseproto.activity.DataBaseHelper.insertData(DataBaseHelper.java:153)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at com.crews.databaseproto.activity.DatabaseProtoActivity.onCreate(DatabaseProtoActivity.java:37)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-04 16:53:20.272: E/AndroidRuntime(18378):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
05-04 16:53:20.272: E/AndroidRuntime(18378):    ... 11 more

Thanks in advance.
Sorry for the wrong link

  • 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-03T07:32:42+00:00Added an answer on June 3, 2026 at 7:32 am
    public synchronized SQLiteDatabase getWritableDatabase()
    

    no need to over-ride this function. Just use the in-build one.

    Also,

    checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READWRITE);
    
    myDataBase = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READWRITE);
    

    change the modes in which you opened the DB to write to.

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

Sidebar

Related Questions

Here's what I'd like to do: I want to create a library project that
I want integrate CPD (Copy-Paste-Detection) to my iOS project. I read about it here
I have a project here that connects to an in-production database and grabs tables
I have a project here the goal is to merge multiple Access DB's into
I have a bare-bones sample project here: http://dl.dropbox.com/u/7834263/ExpandingCells.zip In this project, a UITableView has
I've downloaded the .zip of this project here: https://github.com/SteveDunn/Gleed2D And I installed Visual Studio
Following the instruction found here: Insert a datasheet into a form I get an
I have an ASP.NET MVC3 project. I want to insert some <td> 's in
I'm learning C++ and developing a project to practice, but now i want to
I'm using Elixir in a project that connects to a postgres database. I want

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.