Best way to load data from a CSV file into an ADO.Net DataSet
Smarties
1
Reputation point
Hi,
There's a CSV file, 300k lines, a daily export from an ERP system.
It lives on a network drive.
I need to loop through the 300k lines, analyse, and make decisions (do stuff).
Once in an ADO.Net DataSet I'm off and running.
Do I read the CSV file line by line, split each line based on the known delimitator, and add the fields into a DataTable row by row, or is there a more elegant way with OLE DB for example?
I don't have the experience to know what is the 'right' way to do this.
I'm keen to start 'right', first time!
Thanks.
Developer technologies | .NET | Other
4,103 questions
Sign in to answer