开发者

Import/Export CSV from SQLite from C# code

开发者 https://www.devze.com 2022-12-22 12:57 出处:网络
I am trying to figure out an eazy way to load CSV file into SQLite DB using System.Data.SQLite I saw comma开发者_高级运维ndline way to do that i.e .Import mydata.csv mytable

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

I saw comma开发者_高级运维ndline way to do that i.e .Import mydata.csv mytable

But I need to do this via C# code. Any Idea?


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.


You could use the file helpers library if you want also.And well use the ado.net functionality too.

0

精彩评论

暂无评论...
验证码 换一张
取 消