title: ADODB Connection fails on Windows10 64 bit with SQL Server 2012
body: <p>Our VB6 application currently is deployed on Windows 7 32-Bit with SQL Server 2008 and is working fine.</p>
  <p>We are recently in process of migrating to Windows 10 64-bit with SQL Server 2012 and the following throws an error:</p>
  <pre class="lang-vb prettyprint-override"><code>Set conn = CreateObject(&quot;ADODB.Connection&quot;)
  conn.CommandTimeout = 3600 ' 1 hour
  conn.Open &quot;DSN=MYDSN&quot; =&gt; Error occurs here 
  </code></pre>
  <p>The DSN has been tested independently and connects to SQL server fine.</p>
  <p>The error:</p>
  <ul>
  <li><p>DNS data=Sql Server &amp;  32 bit or 64 bit of ODBC Datasource:</p>
  <blockquote>
  <p>3709, connection cannot be used to perform this operation. It is either closed or invalid in this context.</p>
  </blockquote>
  </li>
  <li><p>DNS data source=SQL Server Native Client 11&amp; 32 bit ODBC Datasource:</p>
  <blockquote>
  <p>3709, connection cannot be used to perform this operation. It is either closed or invalid in this context</p>
  </blockquote>
  </li>
  <li><p>DNS data source: SQL Server Native Client 11 &amp; 64 bit ODBC Datasource:</p>
  <blockquote>
  <p>-2147217843, [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database &quot;ClientDatabase&quot; requested by the login. The login failed</p>
  </blockquote>
  </li>
  </ul>
  <p>Any input is appreciated.</p>