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

Hi,

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
Piyush
piyush
Freshman
Freshman
 
Posts: 2
Joined: Mon Dec 10, 2007 6:22 am

Top

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.031 seconds, using GeSHi 1.0.8.4


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.030 seconds, using GeSHi 1.0.8.4


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 :)

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

Top

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests