title: Query MS Access DB from R with 64-bit Windows
body: <p>Someone asked me to create a Shiny UI to allow them to read and write from their Microsoft Access database, created with MS Office 2010.</p>
  
  <p>I was following <a href="http://rprogramming.net/connect-to-ms-access-in-r/" rel="nofollow noreferrer">this</a> guide to connect to the Access DB with <code>RODBC</code> and -- while I can open this database in Access itself -- I get the following error from R:</p>
  
  <pre><code>&gt; channel &lt;- odbcConnectAccess("AD_Users.accdb")
  Error in odbcConnectAccess("AD_Users.accdb") : `
    odbcConnectAccess is only usable with 32-bit Windows
  </code></pre>
  
  <p>So, I found <a href="https://stackoverflow.com/questions/13070706/how-to-connect-r-with-access-database-in-64-bit-window">this</a> solution and gave it a try:</p>
  
  <pre><code>&gt; channel &lt;- odbcDriverConnect("AD_Users.accdb")
  Warning messages:
  1: In odbcDriverConnect("AD_Users.accdb") :
    [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
  2: In odbcDriverConnect("AD_Users.accdb") :
    [RODBC] ERROR: state 01S00, code 0, message [Microsoft][ODBC Driver Manager] Invalid connection string attribute
  3: In odbcDriverConnect("AD_Users.accdb") : ODBC connection failed
  &gt; channel &lt;- odbcDriverConnect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=AD_Users.accdb")
  Warning messages:
  1: In odbcDriverConnect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=AD_Users.accdb") :
    [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
  2: In odbcDriverConnect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=AD_Users.accdb") :
    ODBC connection failed
  &gt; 
  </code></pre>
  
  <p>but as you can see, there were some pretty serious warnings. It doesn't seem to work. </p>
  
  <p>Is there any other work-around?</p>
  
  <p>I am using 32-bit R when I receive these warnings and even though they're warnings and not technically errors, the database connection is unsuccessful.</p>
  
  <p><strong><em>Update</em></strong></p>
  
  <p>This seems to establish a successful connection, though I've been unable to query data from it thusfar:</p>
  
  <pre><code>channel &lt;- odbcConnectDbase("AD_Users.accdb")
  </code></pre>