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?

1

2 Answers 2

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.
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.

1 Comment

Thanks Goofy... I have done all these steps.But I am getting sqlite exception while performing database operations in my application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.