Browse By

SQLite Database in Android

  • Jena Sookdin Reshmeebye

    hello ive tried this example it works :) but when i add a new editText n TextView(PHONE), it doesnt work..can u plz hlp..can u sir

    • vimal rughani

      Hi Jena, you make reflect of phone (editText) value in database table and query, even you have to upgrade database version, so new database structure will be used. You can share your code and issue which you are facing, so i can give you perfect answer.

      • Jena Sookdin Reshmeebye

        yes :( but it doesnt wrk..can u pllz check my codes if i send the app on mail?thnks :)

        • vimal rughani

          Sure Jena, you can send me code on my mail id, its, I will resolve your issue.

          • Jena Sookdin Reshmeebye

            ive already snd u the mail :) thanks

          • vimal rughani

            Hi Jena, I have resolved your issue and sent corrected code. There was issue with DB Upgrade, you need to change db version when u change structure of db. Please check and let me know if you have any query.

          • Jena Sookdin Reshmeebye

            yes it works :) thanks..ive send u a mail..

          • Jena Sookdin Reshmeebye

            hello..ive tried to add another form(department) its not snding you the app can you plz chk :) thnks

  • Yovun Chooroo

    Hello sir, I have worked your android example and have been able to understand it. I have tried to modify it but its not working. I created the database with (Id,fname,lname,dob,gender) and its working but am not able to add more field in the database. Can i send it to you by mail.

    • vimal rughani

      Hi yovun, please check your mail box, i have resolved your issue and sent you full source code.

  • Larry Eliemenye

    I’m a bit confised about this SQLiteOpenHelper Class we have to extend. I like to follow the DAO (Data Access Object) pattern when accessing data and i dont know where to fit this in. Does every DAO need to extend SQLIteOpenHelper Class or should the SQLIteOpenHelper Class be a layer above every DAO Class in such a way that it acts as a conduit to the database itself.

  • Nep Abrenica

    hi sir can you please see my codes? i’m always getting an error “column ‘name of column’ does not exist” but i already have that column? any help would be much appreciated! thank you in advice

    • vimal rughani

      Hi Nep, Please send me your code at, I will check that code and will solve your issue, According to current understanding I feel like, you have added new column, but forgot to update database version. I will give you perfect answer after checking your code.

  • Nasir Khan

    Thank you Sir its working good and i embed it and modify according to my needs its nice

  • Mahesh Makavana

    hello sir when i click add employee without any value it also insert one row how to solve it ?

    • Vimal Rughani

      Mahesh, before saving data, you have to put condition for validating data, If there is no data in textbox then don’t save it. It will solve your issue.

  • Mahesh Makavana

    thank you sir now i want to create two table in SQLite and first table primary key and second table foreignkey how i do to table in oncreate() method in DBhelper please give some idea/

  • Rohit Pote

    Very Nice tetorials Sir…….thanks

  • Iswadi Nurmansyah

    may i get full code.. i want to create with name address n phone only