I have a test fixture that saves the results in XML files. From there, I can open up an Access database, import the file and append the contents to pre-existing tables. However, I'm trying to get this process automated.
So far with the help of a few tutorials, I've been able to open Access database files using C#. I could read the XML files, parse the data, and insert it into the tables , however, are there any functions/documentation to emulate the import wizard in Access with the XML file location as the argument ?
This is the structure of the XML file:
<root>
  <Test1>
    <Serial_x0020_Number>SerialNumber</Serial_x0020_Number>
    <Date>2015-03-03T07:13:28</Date>
    <Voltage1>7.620000</Voltage1>
    <Voltage2>7.620000</Voltage2>
    <Voltage3>7.620000</Voltage3>
    <Voltage4>7.620000</Voltage4>
    <Pass>N</Pass>
  </Test1>
  <Test2>
    <Serial_x0020_Number>SerialNumber</Serial_x0020_Number>
    <Date>2015-03-03T07:13:28</Date>
    <Voltage1>14.000000</Voltage1>
    <Voltage2>301.000000</Voltage2>
    <Voltage3>251.000000</Voltage3>
    <Voltage4>149.000000</Voltage4>
    <Voltage5>91.000000</Voltage5>
    <Pass>Y</Pass>
  </EFT_x0020_Waveform_x0020_Test>
</root>
The XML file can have anywhere from 1 to 150 entries with 1 to 12 tables, where each "Test" corresponds to a table and the entries in a test correspond to a column.
Tutorial I used to connect to the database: https://www.youtube.com/watch?v=MPBlsJpRFqY
Edit: I ended up parsing the XML and using some of the code Tim Morford posted. Thanks.
 
     
    