1. Download our Official Android App: Forums for Android!

Apps SQLite Database

Discussion in 'Android Development' started by Petedrn, Nov 12, 2010.

  1. Petedrn

    Petedrn Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Nov 12, 2010

    Nov 12, 2010
    1
    0
    5
    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 Newbie
    Rank:
    None
    Points:
    16
    Posts:
    17
    Joined:
    Apr 26, 2010

    Apr 26, 2010
    17
    2
    16
    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 Member
    Rank:
    None
    Points:
    15
    Posts:
    34
    Joined:
    Oct 18, 2010

    Oct 18, 2010
    34
    0
    15
    India
    to use, look over here
     

Share This Page

Loading...