Search code examples
androiddatabasesqliteandroid-sqliteandroid-file

How do I check if sqlite database was created successfully?


I'm having trouble figuring out if I created my database correctly.

I'm trying to locate a .db file to check if database was created successfully but can't find it anywhere in my project explorer, what is correct way to check for database, and it would help to know where such file is located (in project not device) in order to view its data.


Solution

  • Moved my comment here:

    If you're trying to view the db on an actual device, the internal data directory is typically protected. On an emulated device you can (also some rooted phones).

    I understand "project explorer" to be the explorer for the source code? You're db does not exist there, the dir/file exist only on the device...this is the code to create the db. As others now have explained, to view the device files in Eclipse, you need to use the DDMS panel.