Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert values into SQLite database manually

Tags:

android

sqlite

I'm new to Android development and I've just started learning the basics of user-interface development. In my app, I have a spinner and I want to populate the spinner with values from the database. So, for taking values from the database, there have to be some values in it. How do I insert values to the database without writing a program? Can I insert it in any other way like how we insert values in MySQL and Oracle databases? Hope that my problem is well understood.

like image 784
Aparna Shaji Peter Avatar asked Apr 10 '13 15:04

Aparna Shaji Peter


1 Answers

If you want to inset the data manually(fully graphical) do the following:

  1. Go to the DDMS perspective
  2. File explorer (tab-menu)
  3. Locate your db (/data/data/com.example.your_package/databases/your_db.db)
  4. click on the icon up placed beside the other tabs (pull a file from the device)
  5. save your db on your computer
  6. open SQLite Database Browser [Download it from here][1] [1]: http://sourceforge.net/projects/sqlitebrowser/
  7. do your work, and save
  8. turn back to your DDMS and locate your db
  9. click on the icon up placed beside the other tabs (Push a file onto the device)
  10. locate your edited db and click open
like image 72
Saf Avatar answered Oct 22 '22 08:10

Saf