SQLite Database


Last Updated:

  1. Petedrn

    Petedrn New Member This Topic's Starter

    Joined:
    Nov 12, 2010
    Messages:
    1
    Likes Received:
    0
    Hey all,

    I am fairly new to Android programming and really need some help. I tried google but all I found was just too messy for me :)

    I want to be able to save, update and delete things in a SQLite database. I use "SQLite Database Browser 2.0 b1.exe" to create the database and all necessary tables. But there my problem starts.

    Where do I have to copy the database file?

    and

    how can I connect with it to save, update and delete items?
     

    Advertisement
  2. vladimirov

    vladimirov Member

    Joined:
    Apr 26, 2010
    Messages:
    17
    Likes Received:
    2
    Android databases directory of certain application is /data/data/yourpackagename/databases/, but android use other scheme of creating, upgrading and using databases. You need to extend class SQLiteOpenHelper and to override methods onCreate and onUpgrade and then you need to use this class for creating database connections by using methods getReadebleDatabase and getWritableDatabase.
     
  3. mohitjaitly

    mohitjaitly Active Member

    Joined:
    Oct 18, 2010
    Messages:
    34
    Likes Received:
    0
    to use, look over here
     

Share This Page

Loading...