title: ACE.OLEDB.12.0 - Sharepoint Connection Invalid Argument
body: <p>For one of the project I make, I need to retrieve list from Sharepoint using OleDB. Below you can see the code I use:  </p>
  
  <pre><code>string ConnectionString = "WSS;HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.12.0";
  string query = "Select * From [Table]";
  OLEDBConnection conn = new OLEDBConnection(ConnectionString);  
  conn.Open();
  OLEDBDataAdapter dataAdapter = new OLEDBDataAdapter(query, conn);
  DataSet ds = new DataSet();
  dataAdapter.Fill(ds);
  </code></pre>
  
  <p>In place of xxx, yyy, zzz I insert values obtained from .iqy file generated from Sharepoint.</p>
  
  <p>Computer is runnning on Windows 10 Enterprise x64 and have pre-installed Office Professional 2016 x86 (please note that, there is no posibilty of installing 64 bit Office) including Access 2016. Sharepoint server is Sharepoint 2013 version.</p>
  
  <p>With this setup the code threw an exception <code>Invalid argument</code> upon opening connection.  I've also made sure that 12.0 provider was registered. Trying to change the provider to 16.0 version did result in exactly same exception.  </p>
  
  <p>I was advised to try it with "Microsoft Access Database Engine 2010" (x86).  </p>
  
  <p>After installation of that engine from Microsoft page code above started to work. I was able to make connection and get the list using query.  </p>
  
  <p>However, after opening Access, before it opens, it runs some repairs (Office Professional installation is triggered). After this repair the code again stops to work until I reinstall the "Microsoft Access Database Engine 2010"</p>
  
  <p>I've tried to use parameters from Access Linked Table connection string. (It is using ACEWSS; parameter instead of WSS;), but without any result.  </p>
  
  <p>I tried also to remove WSS parameter from connection string but then code throws an error <code>Could not find installable ISAM</code>.</p>
  
  <p>Below please find all connection strings used for connection with the result:</p>
  
  <ol>
  <li><p>Default Access Engine (from Office):</p>
  
  <p><code>WSS;HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.12.0"</code> - Invalid Argument<br>
  <code>ACEWSS;HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.12.0"</code> - Invalid Argument<br>
  <code>HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.12.0"</code> - Could not find installable ISAM
  <code>WSS;HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.16.0"</code> - Invalid Argument<br>
  <code>WSS;HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.16.0"</code> - Invalid Argument<br>
  <code>HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.16.0"</code> - Could not find installable ISAM</p></li>
  <li><p>Access Database Engine 2010 Installed:</p>
  
  <p><code>WSS;HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.12.0"</code> - This one works fine! 
  <code>ACEWSS;HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.12.0"</code> - The Microsoft Access database engine could not find the object 'Table'.<br>
  <code>HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.12.0"</code> - Could not find installable ISAM
  <code>WSS;HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.16.0"</code> - Application stops working.<br>
  <code>ACEWSS;HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.16.0"</code> - Application stops working.
  <code>HDR=YES;IMEX=2;DATABASE=XXX;LIST=YYY;RetrieveIds=Yes;TABLE=ZZZ;Provider=Microsoft.ACE.OLEDB.16.0"</code> - Could not find installable ISAM</p></li>
  </ol>
  
  <p>I've run out of ideas, how to get this connection established and working on the default drivers used by Access and neither understand why the same connection string works with the 2010 version installed and does not work with the default Access 2016 driver.  I will appreciate any advice.</p>