How to convert MDB to SQLite in Android How to convert MDB to SQLite in Android sqlite sqlite

How to convert MDB to SQLite in Android


You need to use some tools to convert database, refer to supported list softwares that do the job you need here: http://www.sqlite.org/cvstrac/wiki?p=ConverterTools


You can write your own - it's not very difficult

  1. Install SQlite on your desktop - just go to sqlite.org
  2. Get JDBC access to SQLite (there're a lot of JDBC drivers for SQLite)
  3. Get JDBC access to your MDB (MS-Access) using JDBC (common JDBC-ODBC bridge driver is ok)
  4. VoilĂ !


Steps to read Access files in android :

1-Creat Acces Database then,Export the access database into text files, semicolon or comma delimited.2-Open the SQLite database browser version 1.1 ( http://sourceforge.net/projects/sqlitebrowser/files/sqlitebrowser/1.1/sqlitebrowser-1.1-win.zip/download?use_mirror=garr&download= ) and chose creat new DATABASE then enter it's name ,then file menu ->import->table from csv file. Browse for your text file and choose the proper delimiter. Click create.3-Done.

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.

Now :Using your own SQLite database in Android applications example here:http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/