Handling double quotes within Delimited Values

Mar 21, 2014 at 4:33 PM
Edited Mar 21, 2014 at 4:45 PM

I'm using version but I'm having trouble reading a csv which has a QUote within a quote delimited value i.e "37" Televsion",

Is there a config option which will allow the dataSet.Fill option to process the row? At the moment it gives me the error
__DataTable has 38 columns, but a DataRecord had 54. The number of columns in the DataTable must match or exceed the number of values in each DataRecord.
I'm using the following

reader.ValueDelimiter = '"';

Mar 21, 2014 at 10:34 PM

If there's a quote within the delimited value, it needs to be escaped in order to be valid CSV. So your value should look like:
"37"" Television"
Marked as answer by INnerDemonJ on 3/24/2014 at 9:51 AM
Mar 24, 2014 at 4:51 PM
Ok thanks I will talk to the provider of the CSV and see if i can get them to change their output mechanism