title: .Dat file to dataset
body: <p>I have a .dat file that I need to import into a datatable. I am using .net framework 4.5 and it delimited by ~. How do I import this? I tried </p>
  
  <pre><code>string mySelectQuery = "SELECT * FROM " + fileName;
  OleDbConnection myConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;DataSource=" + fileLocation + ";Extended Properties=\"text;HDR=YES;FMT=Delimited\"");
  OleDbDataAdapter dsCmd = new OleDbDataAdapter(mySelectQuery, myConnection);
  //Fill the DataSet object
  dsCmd.Fill(myData, "Packets");
  </code></pre>
  
  <p>Please help</p>