-1

Hi i'm new in android programming,i need your help, i want to create an android database using an EditText and Button the button is to submit the data inserted into EditText, i have two Activity the first is the Adding the database and second is viewing the list of database saved. I'm creating a simple "Adding Employee and save it into database"

here's my code on creating a database;

SQLiteDatabase db = openOrCreateDatabase("MyDB", MODE_PRIVATE, null);
db.execSQL("CREATE TABLE IF NOT EXITS employee (name VARCHAR, positon VARCHAR);");

Now i dont have idea how can i insert the data in ediTtext into Viewing Database any answer is appreciated.Thanks regards xyvyre

xyvyre
  • 165
  • 1
  • 4
  • 10
  • http://stackoverflow.com/questions/9109438/how-to-use-existing-database-with-android-app/9109728#9109728 – Yaqub Ahmad Oct 07 '12 at 05:10
  • What exactly is your problem? How to insert something into the database? How to display the new data in the second activity? How to organize the activities? – CL. Oct 07 '12 at 09:57
  • yes sir as a list view i dont have idea how i do it – xyvyre Oct 07 '12 at 09:59

1 Answers1

0

For some tutorials on how to display data in list view, see the official Notepad sample (especially the fillData() method), or the Android SQLite Database and ContentProvider - Tutorial .

CL.
  • 173,858
  • 17
  • 217
  • 259