Quantcast
Channel: DataSource Controls - SqlDataSource, ObjectDataSource, etc.
Viewing all articles
Browse latest Browse all 956

Read a .CSV file

$
0
0

Here is my current connection string:

string connString = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""{0}"";Extended Properties=""text;HDR=NO;FMT=Delimited\""",Path.GetDirectoryName(csv_file_path));

This works fine except I have a few lines of code as follows:

"jon","smith","ohio"
"tom","jones","indiana"
"mary","baker "mills","florida

The last line has quotes within the field and the field is ending before "mills".  Does anyone have a connection string that can accommodate a quote within a data field?

Thanks!


Viewing all articles
Browse latest Browse all 956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>