1

I'm working on Android and using Eclipse to develop and the emulator to test my application, I'm trying to insert the content from an ArrayList into a database, but when I try to access to the database's information through the console I get the following message:

Error: unable to open database /data/data/my.package/databases/ars.db : unable to open database file

So far I know the database is being created correctly since every time I insert a row the SQLiteDatabase's insert method returns the id of the row created and so far I have run my application 6 times and the last id I got was 18.

I'm trying to access to the database the following way:

#sqlite3 /data/data/my.package/databases/ars.db

and then when I try :

sqlite>.tables

I get the error message. What am I doing wrong? Why can't I get permission to access to the database data? Is it because I'm using the emulator instead of an Android device? Thanks for any piece of advice you can give.

Uriel
  • 1,365
  • 2
  • 12
  • 15
  • You can read this may help you. http://stackoverflow.com/questions/3563728/random-exception-android-database-sqlite-sqliteexception-unable-to-open-databas – MadeInChina Sep 03 '12 at 03:18
  • no that didn't work, I can access to it from my application, it's through the console that I have problems. – Uriel Sep 03 '12 at 04:29
  • Almost having same problem – Hafiz Sep 12 '15 at 16:09
  • but i figured out that problem was in the way how i access my db. Try your DB without .db like ; sqlite3 /data/data/my.package/databases/ars – Hafiz Sep 12 '15 at 16:19

0 Answers0