0

In my android application, I am copying the sqlite database file to "data/data/com.mypackage/databases" at runtime.

I am using ormlite for database operations, but I'm not able to perform any databse operation (e.g. insert, retrieve, delete) because it is not getting any tables from the sqlite file.

However, when I copy that file in my SDCard everything works fine. I have verified that the file gets really copied in "data/data/com.mypackage/databases", which is the case.

Does anybody have any idea about how to read sqlite file stored in data/data directory using ormlite in android application?

Gray
  • 115,027
  • 24
  • 293
  • 354
adi
  • 698
  • 8
  • 15

2 Answers2

1

select your file from data/data folder and pull the data base file in any location of your pc and simply open it with Firefox SQLite Manager

Naveen Kumar
  • 3,738
  • 4
  • 29
  • 50
  • Hey Naveen, I am not able to perform database operations in my android application when I am putting database file in data/data folder. I am getting sqlite exception that table entry not found for every table in database file. – adi Oct 11 '12 at 05:25
0

First of all if you want to read data/data folder from your device its not possible unless you r phone is rooted.

Second thing if you want to see the database in data/data of your emulator follow this:

  1. go to DDMS Perspective.
  2. select data/data/your package name/database/yourdatabsename
  3. select that on the top you can find two options and one among them is pull you file.
  4. save the file some where in your computer.
  5. download sqlite browser by searching in google.
  6. using the sqlite browser you can access your database.

hope it helps.

Goofy
  • 6,098
  • 17
  • 90
  • 156
  • Thanks Goofy... I have done all these steps.But I am getting sqlite exception while performing database operations in my application. – adi Oct 11 '12 at 05:33