title: Parsing CSV using OleDb using C#
body: <p>I know this topic is done to death but I am at wits end.</p>
  
  <p>I need to parse a csv. It's a pretty average CSV and the parsing logic has been written using OleDB by another developer who swore that it work before he went on vacation :)</p>
  
  <pre><code>CSV sample:
  Dispatch Date,Master Tape,Master Time Code,Material ID,Channel,Title,Version,Duration,Language,Producer,Edit Date,Packaging,1 st TX,Last TX,Usage,S&amp;P Rating,Comments,Replace,Event TX Date,Alternate Title
  ,a,b,c,d,e,f,g,h,,i,,j,k,,l,m,,n,
  </code></pre>
  
  <p>The problem I have is that I get various errors depending on the connection string I try.</p>
  
  <p>when I try the connection string:</p>
  
  <pre><code>Provider=Microsoft.Jet.OLEDB.4.0;Data Source="D:\TEST.csv\";Extended Properties="text;HDR=No;FMT=Delimited"
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>'D:\TEST.csv' is not a valid path.  Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
  </code></pre>
  
  <p>When I try the connection string:</p>
  
  <pre><code>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\TEST.csv;Extended Properties=Excel 12.0;
  </code></pre>
  
  <p>or the connection string</p>
  
  <pre><code>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\TEST.csv;Extended Properties=Excel 8.0;
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>External table is not in the expected format.
  </code></pre>
  
  <p>I am considering throwing away all the code and starting from scratch. Is there something obvious I am doing wrong?</p>