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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:24:33+00:00 2026-05-13T15:24:33+00:00

i was creating a database and deleting it, adding registries on my android htc

  • 0

i was creating a database and deleting it, adding registries on my android htc mobile sqlite database without any problem.

But now, after last deleting of the database everytime i want to create a new one i get a sqlite exception that says me “unable to open database file” with the following data:

serialVersionUID (RuntimeException)= -7034897190745766939
cause= SQLiteException (id=830058513528)
cause= SQLiteException (id=830058513528)
detailMessage= “unable to open database file” (id=830058513560)
stackState= (id=830058513672)
stackTrace= null

This is my code to create a database:

private static String DB_PATH = "/data/data/Android.Applications/databases/testdatabase.db";

public void OpenDataBase(){

            SQLiteDatabase ApplicationDB = null;
            //Si existe la base de datos
            if(checkDataBase())
            {
                //Open readonlymode
                String myPath = DB_PATH;
                //open database as readwrite mode
                ApplicationDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READWRITE);
            }
            else
            {
                try
                {
                    String myPath = DB_PATH ;
                    ApplicationDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.CREATE_IF_NECESSARY);
                    CreateTables();
                    //create all the necessary tables
                    System.out.println("DataBASE CREATED");
                }
                catch(SQLiteException e)
                {
                    System.out.println("SQL LiteException"+ e.getMessage());
                }
            }
        }

 private boolean checkDataBase(){

        try{
            String myPath = DB_PATH;
            ApplicationDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY);

        }catch(SQLiteException e){

            //database does't exist yet.
        }
        if(ApplicationDB != null){

            ApplicationDB.close();
        }
        return ApplicationDB != null ? true : false;
    }

And this is the code for delete database

 public boolean DeleteDatabase()
        {
            boolean wasdeleted;
            try
            {
                File file=new File(DB_PATH);
                wasdeleted=file.delete();
            }
            catch(SecurityException e)
            {
                wasdeleted=false;

            }
            return wasdeleted;
        }

Could you give me a hand? im stucked here, cause this code works few hours ago…

Thanks in advance.
Best Regards.
Jose.

  • 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-13T15:24:33+00:00Added an answer on May 13, 2026 at 3:24 pm

    You might consider switching to use SQLiteOpenHelper, which would eliminate most of your code.

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

Sidebar

Ask A Question

Stats

  • Questions 384k
  • Answers 384k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer x <- c(3,3,3,3,2,2,2,3,1,NA,NA,2,2) y <- c(4,2,3,4,3,4,4,4,3,4,3,3,3) sum(x*y,na.rm = T)/sum(!is.na(x*y)) [1]… May 14, 2026 at 11:03 pm
  • Editorial Team
    Editorial Team added an answer Windows Forms doesn't support this. Controls must be child windows,… May 14, 2026 at 11:03 pm
  • Editorial Team
    Editorial Team added an answer You can set a cookie using setcookie() However, I don't… May 14, 2026 at 11:03 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.