title: ADODB Connection Fails on Windows 7 but Not XP
body: <p>I have a simple program to test opening a connection to excel file using ADODB.
  This is ASP Classic using VBScript.
  Here is the code:</p>
  
  <pre><code>&lt;%@ Language="VBScript" %&gt;
  &lt;% Response.buffer = true %&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;%
  
  'Name of the excel file
  exceldb="AW_Test.xls"
  excel_file_name=Server.MapPath(exceldb)
  response.write(excel_file_name)
  
  Set cn = Server.CreateObject("ADODB.Connection")
  cn.Open "Driver={Microsoft Excel Driver (*.xls)}; DriverId=790; DBQ=" &amp;excel_file_name &amp; ";"
  
  cn.Close
  Set cn=Nothing
  
  Response.Write("All is good in the world...")
  
  %&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When trying to run on this configuration:</p>
  
  <ul>
  <li>Windows 7 64bit </li>
  <li>IIS 7  </li>
  <li>Application Pool in 32 bit mode  </li>
  <li>Files in root directory</li>
  <li>Running on Local Host [http://localhost/adotest.asp]</li>
  </ul>
  
  <p>I get the following results:</p>
  
  <pre><code>C:\inetpub\wwwroot\AW_Test.xls 
  
  Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
  
  [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data. 
  
  /adotest2.asp, line 13 
  </code></pre>
  
  <p>However, on the same machine under this configuration:</p>
  
  <ul>
  <li>Virtual PC in XP Mode</li>
  <li>IIS 6</li>
  <li>Files in root directory</li>
  <li>Running on Local Host [http://localhost/adotest.asp]</li>
  </ul>
  
  <p>I get the following results:</p>
  
  <pre><code>c:\inetpub\wwwroot\AW_Test.xls
  All is good in the world... 
  </code></pre>
  
  <p>Things I have verified/tried:</p>
  
  <ul>
  <li>Verified permissions (note this is the root directory)</li>
  <li><p>Tried using the Jet Engine instead with</p>
  
  <pre><code>   cn.Open 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\WWWRoot\AW_Test.xls;Extended Properties="Excel 8.0;HDR=No"'
  </code></pre></li>
  </ul>
  
  <p>Got error:</p>
  
  <pre><code>C:\inetpub\wwwroot\AW_Test.xls
  Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
  
  [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 
  
  /adotest3.asp, line 13 
  </code></pre>
  
  <ul>
  <li>Verified ALL application pools running in 32 bit mode</li>
  <li>Verified drivers exist in SYSWOW side of data sources</li>
  </ul>
  
  <p>I am sure I am missing something simple but, I am about out of things to try.
  I know there are much better ways than ASP Classic etc. but, this should still work...</p>
  
  <p>I appreciate any help...</p>