title: Oracle 10g ODBC Connection fails in MS Access 2010, but works in ODBC Control Panel
body: <p>I set up a DSN for an Oracle 10g database (old, I know) on 64 bit Windows 7 with the 32 bit ODBC control panel.  That connection tests successfully.</p>
  <p>When I try to connect to the same DSN from inside of Access 2010, I get the following error:</p>
  <blockquote>
  <p>ODBC--call failed.</p>
  <p>[Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specificed</p>
  <p>(#12154)[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed IM006 0 [Microsoft]ODBC Driver Manager] Driver's SQLSetConnectAttr failed (#0)</p>
  </blockquote>
  <p>TNS ping finds my TNS name just fine.  The 'Test Connection' button from inside of the ODBC control panel screen works just fine.  The same screen invoked from within MS Access shows that error above.  It looks like Access invokes some shared library in Office 2010 to make the connection that wraps the libraries used by the ODBC control panel and drivers.  I get the same error if I try to make the connection using MS Query 3.0.</p>
  <p>Googling around didn't find much, because TNS issues are so common.  I'm 99% sure this is a problem in how Office libraries wrap the ODBC libraries.  The closest thing I saw in my search was a question here on SO where the asker discovered that Access was finding a different sqlnet.ora file than he intended it to use.  Once he renamed that extra sqlnet file, it worked fine.  I've renamed every one on my disk except for the one in my admin/network folder, and still can't make the connection.</p>
  <p>I'm really at a loss here, folks.  Any idea one what I could try?  In the mean time, I'm going to try to write a quick VBA script that will try to manually make the connection.</p>