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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:46:44+00:00 2026-06-07T13:46:44+00:00

While using sqlite database in android I am getting a weird problem. I am

  • 0

While using sqlite database in android I am getting a weird problem.
I am inserting about 500 enteries in a table but when the table has around 260-270 enteries it shows this exception:

              sqLiteCantOpenDatabaseException

CODE:

         public last_open open() throws SQLException {db = DBHelper.getWritableDatabase();return this;}
public void close() {DBHelper.close();}


public static  void insert(

        String STUDENT_ID,
        String COURSE_ID,
        String PACKAGE_ID,
        String ITEM_NAME,
        String ITEM_ID,
        String LAST_OPEN
){
    try{


        ContentValues initialValues = new ContentValues();
        initialValues.put(T_STUDENT_ID,STUDENT_ID);
        initialValues.put(T_COURSE_ID, COURSE_ID);
        initialValues.put(T_PACKAGE_ID, PACKAGE_ID);
        initialValues.put(T_ITEM_NAME,ITEM_NAME);
        initialValues.put(T_ITEM_ID, ITEM_ID);
        initialValues.put(T_LAST_OPEN,LAST_OPEN);

    //  db.insert("LAST_OPEN", null, initialValues);
    db.execSQL("DELETE FROM LAST_OPEN WHERE STUDENT_ID="+STUDENT_ID+" AND COURSE_ID="+COURSE_ID+" AND PACKAGE_ID="+PACKAGE_ID+" AND ITEM_ID="+ITEM_ID+" AND ITEM_NAME='"+ITEM_NAME+"';");
    db.execSQL("INSERT INTO LAST_OPEN(STUDENT_ID,COURSE_ID,PACKAGE_ID,ITEM_NAME,ITEM_ID,LAST_OPEN) VALUES ("+STUDENT_ID+","+COURSE_ID+","+PACKAGE_ID+","+"'"+ITEM_NAME+"'"+","+ITEM_ID+","+"'"+LAST_OPEN+"'"+");");
}catch (Exception e) {
    // TODO: handle exception

    e.printStackTrace();
}
}

These are the methods I am using ::

Log:

     SqliteDatabaseCpp(586): sqlite returned: error code = 14, msg = cannot open file at line 27360 of [8609a15dfa], db=/data/data/com.cuelearn.main/databases/cuelearn
     SqliteDatabaseCpp(586): sqlite returned: error code = 14, msg = os_unix.c: open() at line 27360 - "" errno=24 path=/data/data/com.cuelearn.main/databases, db=/data/data/com.cuelearn.main/databases/cuelearn
     SqliteDatabaseCpp(586): sqlite returned: error code = 14, msg = statement aborts at 28: [DELETE FROM LAST_OPEN WHERE STUDENT_ID=95 AND COURSE_ID=2 AND PACKAGE_ID=13 AND ITEM_ID=267 AND ITEM_NAME='Chapter';] , db=/data/data/com.cuelearn.main/databases/cuelearn  
enter code here
     System.err(586): android.database.sqlite.SQLiteCantOpenDatabaseException: error code 14: unable to open database file

I dont know how to solve this problem neither I am getting the cause of this. I have seen some people getting this exception when trying to copy database from assets.But in my case I am not copying the database.Please help me I am using Android 4.0.3?

  • 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-07T13:46:46+00:00Added an answer on June 7, 2026 at 1:46 pm

    its possible that you are trying to open a database file which is already open.

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

Sidebar

Related Questions

I am using sqlite database for iphone app. but its crash on while loop
Just a simple question for SQLite while using it in Android. I want to
I am trying to update cached_name column of callog.calls table in android,but getting sql
I'm querying some products in SQLite database, but same base in 2 differents android's
I'm trying to test a simple SQLite database using Robolectric in my Android application.
While using Nivo Slider it enlarges my images to about 2x their original size
While using regex to help solve a problem in the Python Challenge , I
While using the vector why do we sometime use the operator[] like homework[mid] but
I'm getting some very jerky scrolling while using the code below to create a
I guess many people already read this article: Using your own SQLite database in

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.