title: Using ADO in Access to import CSV data
body: <p>So I navigated to the following <a href="http://msdn.microsoft.com/en-us/library/ms974559.aspx" rel="nofollow">MSDN Resource Page</a> that addresses how to use ADO objects.  My problem is that I cannot get it to work.</p>
  
  <p>What I am trying to do is open a CSV file and read it line-by-line, then create SQL INSERT statements to insert the records into an existing Table in Access 2010.  I have tried to find an easier method of doing this, but this appears to be my only option. doing this with the included tools, but so far, I haven't had any luck.</p>
  
  <p>The main issue here is that I have CSV files with inconsistent headings.  I want to import 5 files into the same table, but each file will be different depending on which fields contained data.  Those fields with no data in them were ignored during the extract.  This is why I can't use something like DoCmd.TransferText.</p>
  
  <p>So, now I need to create a script that will open the text file, read the headers in the first line and create a SQL INSERT statement dependent on the configuration of that particular file.</p>
  
  <p>I have a feeling that I have a good handle on how to appraoch the issue, but no matter what I try, I can't seem to get things working using ADO.</p>
  
  <p>Could anyone explain how I can achieve this?  My sticking point is getting the Access DB to receive information from the CSV files via ADO.</p>