help to convert a csv file to a sqlite table.

Discussion in 'Questions (Windows Mobile)' started by mozaharul, Nov 20, 2008.

  1. mozaharul

    mozaharul Active Member Licensed User

    Hi,

    To convert a csv file to sqlile I did :

    1. initialize a new connection in the App_start (con.New1)

    2. "table1" has been populated from a csv file and shows rows.

    3. in the click event of a button used : con.CreateSQLTable("table1","rew")

    but generating error :

    "con.CreateSQLTable("table1","rew")
    Error description
    operation is not valid due to the current state of the object.
    continue ?"

    off course I have done mistake, pl. correct me.

    regards,
     
  2. N1c0_ds

    N1c0_ds Active Member Licensed User

    I made an application just for that.
    Make sure the first row of your CSV file is the column names.

    EDIT:Oh and the table created is a ".gdb" file and that the table name is "Main". I posted the source so you can edit it yourself.
     

    Attached Files:

    Last edited: Nov 20, 2008
  3. mozaharul

    mozaharul Active Member Licensed User

    Hi N1c0_ds,

    Thanks and I appreciate for your help. The small mistake I was doing, your code helped me to correct it.


    best regards,
     
  4. Filippo

    Filippo Expert Licensed User

    CSVtoSQL with Listview.dll

    Hi mozaharul,

    here are a simpler example with Listview.dll. ;)


    Ciao,
    Filippo
     

    Attached Files:

Loading...
  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