Problem Converting CSV to SQLite

Discussion in 'Questions (Windows Mobile)' started by tcgoh, Oct 31, 2007.

  1. tcgoh

    tcgoh Active Member Licensed User

    Hi Erel,

    I’m very new to SQL programming. I have used dzt’s program under ”Convert Any Database to SQLite(source & exe) to convert my CSV file to SQLite(.sl3) file.

    After converting to SQLite file (test.sl3), its look very difference from your northwind.sl3 file.

    Attached is my CUSTS2.CSV file. Can you help or any suggestions on ways to convert files?

  2. Erel

    Erel Administrator Staff Member Licensed User

    You can use Connection.CreateSQLTable to convert your CSV file.
    Using a Table control load the file with Table.LoadCSV.
    Now export the table data to a SQL table using Connection.CreateSQLTable.
    There is a small example here:
  3. tcgoh

    tcgoh Active Member Licensed User

    Tks Erel,
    I used dzt's example and my sl3 file come up very difference. please see attached. Not sure I got is right?
  4. Erel

    Erel Administrator Staff Member Licensed User

    This is not a valid SQLite database.
    I recommend you to use Connection.CreateSQLTable.
  5. dzt

    dzt Active Member Licensed User


    I've tested your CSV with my example and it produces a valid SQlite database.

    My example uses mainly Connection.CreateSQLTable, plus the VB6 program to produce the CSVs from databases
  6. tcgoh

    tcgoh Active Member Licensed User

    Hi dtz,

    Thank you for looking into my problem. Could you kindly give me an example (or codes) on how to use Connection.CreateSQLTable and export to .sl3 file.

    Many thanks
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice