I am considering using KBCSV as standard data providers seem to have issues with things like leading zeros, white space etc.
I am wanting to write code that reads a CSV file into and unbound data set particularly with leading zeros intact.
I assume KBCsv handles date strings OK such as 24/06/2010.
If the CSV has no header row then I want to put it into a DataSet that then has columns named C1, C2, C3 etc.
My current code achieves this by updating the column names of the DataSet after it has been filled with data.
I noticed in the documentation for KBCSV where it refers to the Fill method it says:
"The header record for the CsvReader must be set prior to invoking this method. The data read must conform to the header record. That is, if a record is found with more columns than specified by the header record, an exception will be thrown."
Does this mean that in order to use the Fill method you have to call ReadHeaderRecord or does this mean that if you call ReadHeaderRecord it must be before fill?
Can I use the fill method without a header row in the CSV?
In other words: How would I fill a dataset from a csv that has no header record but set the column headings of the data table to C1,C2,C3 etc.