How to port an existing MS Access to SQLite for use with android app developement? [duplicate] How to port an existing MS Access to SQLite for use with android app developement? [duplicate] sqlite sqlite

How to port an existing MS Access to SQLite for use with android app developement? [duplicate]


The easiest way would be to export each table to CSV and then use an SQLite tool of some sort to import those tables into your SQLite database. I use SQLite Expert.

Then you would need to make some modifications to that database and those tables to make it usable by Android to populate listviews and other widgets.

1) The database must contain a table called "android_metadata"
2) This table must have the column "locale"
3) There should be a single record in the table with a value of "en_US"
4) The primary key for every table needs to be called "_id" (this is so Android will know where to bind the id field of your tables)

Then you put the DB in your assets folder and when your app starts copy it to your apps data directory.

A good link for this copying process is here.

You could also use SQLiteAssetHelper to handle the transfer of the DB from assets to your data directory instead of doing the way the tutorial shows if you felt the need.