I have been working on Android application, did a lot of research on connecting it with sqlite, but it never works. does any body have any small android project with one or two tables based db? i need source code, it will be helpful to understand for me.
Asked
Active
Viewed 875 times
0
-
Android Tutorial has two(!) - http://developer.android.com/guide/topics/data/data-storage.html#db look at the end of the section. – MByD Apr 23 '11 at 06:44
1 Answers
1
The notepad tutorial is a decent introduction to using a database in an Android app.

Thane Anthem
- 4,093
- 4
- 26
- 24
-
Hi, the application works perfectly, but i am finding database named "data" but there is no file of this name anywhere, even not in assets, application is saving file nicely, but where it is saving, where the db is, lol its a mystery, how can i access it, please let me know. – Muhammad Atif Agha Apr 25 '11 at 06:45
-
(Please upvote and accept when appropriate.) The database will be in the /data/data/YOUR.APP.PACKAGE/databases/ directory. You'll not usually access it with file IO. – Thane Anthem Apr 25 '11 at 07:02
-
I cannot access it from sqlite browser, as i think i cannot open its db file on computer, because there is no data folder or databases directory. – Muhammad Atif Agha Apr 25 '11 at 07:17
-
(Please upvote and accept when appropriate.) Take a look at http://stackoverflow.com/questions/1995320/how-to-backup-database-file-to-sdcard-on-android – Thane Anthem Apr 25 '11 at 07:20
-
thanks, nice link, but it is about virtual database which you cannot touch on pc, but i saw a tutorial, in which there was a way to access it and edit it with sqlite browser, to place db in assets bla bla, but this db is completely virtual, is there any way to open it on pc, – Muhammad Atif Agha Apr 25 '11 at 07:34