Possible Duplicate:
Where does Android emulator store SQLite database?
I am using SQLite and phonegap to create a multi platform app. However, I have run across an issue.
I am now looking for the location the phonegap stores the database files named 0000000000000001.db
and database.db
I have found this for iPhone, however cannot seem to get the location for the Android. I am currently running on a simulator and actual device (ARCHOS).
The Android SDK provides dedicated APIs that allow developers to use SQLite databases in their applications. The SQLite files are generally stored on the internal storage under /data/data/<packageName>/databases.
We can retrieve anything from database using an object of the Cursor class. We will call a method of this class called rawQuery and it will return a resultset with the cursor pointing to the table. We can move the cursor forward and retrieve the data. This method return the total number of columns of the table.
1) First identify the rows those satisfy the definition of duplicate and insert them into temp table, say #tableAll . 2) Select non-duplicate(single-rows) or distinct rows into temp table say #tableUnique. 3) Delete from source table joining #tableAll to delete the duplicates.
Open the DDMS perspective Window: (window->open perspective->other->DDMS) It should open in a new tab.
Go to DDMS -> file explorer -> data -> data -> see your package name -> databases -> here your database file. (In the upper right, choose "Pull file" from device.) Export it and open through an Sqlite database connector.
You will see your updated data. Before taking these steps make sure that you have run your application first.
Here you can find your database, but only on emulator
usually the database of app resides at the below folder
/data/data/[packagename]/databases
But have never used phonegap, so this might be different. You could check at above location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With