How to convert an Access database to a sqlite database

Discussion in 'Code Samples & Tips' started by Peter, May 4, 2007.

  1. Peter

    Peter Member Licensed User

    First of all, this wisdom isn't mine. I found it on the internet when i wanted to convert an MS Access database. As this could be helpfull to other B4PPC users i will quote the text here. Thanks to SSIDE for the following text.

    1-Export the access database into text files, semicolon or comma delimited.
    2-Open the SQLite database browser version 1.1 and chose file->import->table from csv file. Browse for your text file and choose the proper delimiter. Click create.
    3-Done.

    I assume that you have already a access database and you have already created a sqlite database with the proper table. Before you import the text file (csv file) into sqlite you must open the sqlite database where you want to import the text file (csv file) to. If you have created no table then the opportunity will be given to create one or to use the first line of the text file (csv file) to create the fields (columns).

    Another way to create sqlite database from access or from excel is to save each column into a text file. That means a table with 7 columns = 7 text files. Use TextFile.ReadToTable to read the contents of the 7 text files into tables and use the for loop to load them into a sqlite database.
    There are other ways to convert access database or excel doc into sqlite database but i described 2 of them.
    I have used similar ways to create sql databases but in some occassions you need a php script.


    The SQLite database browser can be found at http://sqlitebrowser.sourceforge.net. The latest version is 1.3.

    I've tried it and it works as a charm. Mind you, it can take a very long time to convert a large table.

    Peter
     
  2. dzt

    dzt Active Member Licensed User

    Convert Access and MSSQL to SQLite

    A better way is to download SQLite2007 Pro Enterprise Manager (freeware) from http://www.osenxpsuite.net/?xp=3

    Dimitris

    ----------
    Basic4ppc: best rad tool for Windows Mobile!
     
    Last edited: May 20, 2007
    BitsAndBytes likes this.
  3. Peter

    Peter Member Licensed User

    Thank you, Dimitris. I'll try that.
    The descrition i gave works, but i've found out that in some cases it takes a very, very, VERY long time to convert.


    Peter
     
  4. manu

    manu Active Member Licensed User

  5. JensPusch

    JensPusch New Member

    The SQLite2007 Pro Enterprise Manager is not really freeware, since it limits the number of records to 100 (and is thatway probably useless for everybody). Without limitations you've got to pay.
     
  6. dzt

    dzt Active Member Licensed User

    Hi JensPusch,

    You are right. When I had posted the link it was realy freeware (at least as I remeber). Now it is not.

    In the meantime I've made my own tool posted here
    http://www.basic4ppc.com/forum/showthread.php?t=297
    which fits better in my needs.

    Regards
     
Loading...