CSV to SQLite

Hello! Please any suggest me how can I directly post CSV data to
SQLite table without foreach(....) { INSERT...} iterate operation?
First I think I must read CSV to intermediate collection.
What library do you use for reading CSV format to DataTable or IEnumerable?
I found
http://joshclose.github.io/CsvHelper/
http://www.filehelpers.com/
http://commonlibrarynet.codeplex.com
https://github.com/ServiceStack/ServiceStack.Text#servicestackcsvserializer (with strang jsv format).

What are you using?

Posts

  • VitalyVitaly USMember ✭✭

    More I need to directly pass CSV to AutoCreated SQLite table. Interesting this capability!

  • VitalyVitaly USMember ✭✭

    Will this method described on stockoverflow working on xamarin.android/ iOS ?

     "...you can create OleDbConnection to CSV file (just google it, it is very easy) then load   rows to DataSet, then put that dataset into Sqlite by SqliteConnection. Few lines of code..."
     http://stackoverflow.com/questions/2386074/import-export-csv-from-sqlite-from-c-sharp-code
    
  • DhirendraKumarDhirendraKumar INMember ✭✭
    edited August 2014

    I am looking for something similar too

    The employeedirectory app shows how to implement a csv reader but any reference to OleDb on Xamarin will be great start

    @Vitaly‌ did you achieve this ?? or any one

  • nodoidnodoid GBMember, Beta ✭✭✭

    Given OldDBConnection is in Mono (via System.Data.OleDB) and is listed on api.xamarin.com as being in Xam.iOS and Xam.Android, you should be able to use something like http://goo.gl/bWh1MA to create the connection, though I will say now that I've not tried it.

  • DhirendraKumarDhirendraKumar INMember ✭✭
    edited August 2014

    Thanks @nodoid‌

    I did some more reading of Xamarin docs at this System.Data guide under Missing Functionality it says System.Data.OleDb functionality is missing from System.Data

    Team Xamarin it will be really nice to have OleDb support added ... Thank you

  • SKallSKall USMember ✭✭✭✭

    If you want true crossplatform then forget about OleDb. Even if you could get it on iOS and Android it will be a pain to get it included on WP. Is there something wrong with the ServiceStack parser? In any case CSV parsing is simple stuff and could be done in a few lines of code.

Sign In or Register to comment.