Database store file location

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Database store file location

Postby piyush » Wed Dec 12, 2007 3:02 pm


Could you pls help me to find location path of database files which is created while apllication execution.
i wanted to delete manually it and carete new from my application

Thank you in advance
Posts: 2
Joined: Mon Dec 10, 2007 6:22 am


Postby plusminus » Wed Dec 12, 2007 5:11 pm

Hello piyush,

how did you create the database in your application :?:
If you did it like this:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  public SQLiteDatabase  createDatabase(String name, int version, int mode, CursorFactory factory)
  2. // Create a new private SQLiteDatabase associate with this Context's application package. Throws FileNotFoundException if the databse could not be created.
Parsed in 0.047 seconds, using GeSHi

You can delete it with the following call:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  public boolean deleteDatabase(String name)
  2. // Delete an existing private SQLiteDatabase associated with this Context's application package.
Parsed in 0.032 seconds, using GeSHi

The functions come from a superclass of Activity ((Application)Context), so you can call it in any function of your Activity.

Tell us if that helped you :)

Image | Android Development Community / Tutorials
User avatar
Site Admin
Site Admin
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany


Return to General

Who is online

Users browsing this forum: No registered users and 3 guests