Import/Export CSV from SQLite from C# code

前端 未结 2 414
Happy的楠姐
Happy的楠姐 2021-01-05 13:01

I am trying to figure out an eazy way to load CSV file into SQLite DB using System.Data.SQLite

I saw commandline way to do that i.e .Import mydata.csv mytable<

2条回答
  •  [愿得一人]
    2021-01-05 13:25

    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.

提交回复
热议问题