title: If I compile a VB6 app on win7, ADODB.Connection errors with "Class does not support Automation or does not support expected interface"
body: <p><img src="https://i.stack.imgur.com/fbjM6.png" alt="Class does not support Automation or does not support expected interface"></p>
  
  <p>I compiled some VB6 code on my Win7 x64 machine and the result .exe will not run correctly on any other machine.</p>
  
  <p>VB6 code is just a new template .exe file with one button, a reference to "Microsoft ActiveX Data Objects 2.6 Library" and the following code in the button press event:</p>
  
  <pre><code>Dim db
  Set db = New ADODB.Connection
  </code></pre>
  
  <p>It runs correctly on my machine, but no others (even other Win7 x64 machines) (Update: I found TWO other users where it runs and one of them is Jeff Atwood!, but most machines have the same problem)</p>
  
  <p>I checked the references screen on both machines to see if a reference failed (it wouldn't compile then though and it compiles fine).  Everything looks legit.  On the 64 bit machines, the references go into SysWow64 instead of system32.</p>
  
  <p>I've even compiled this successfully on a Vista 64 bit machine and had it run correctly.  It's only the compile on the Windows 7 and then running on any other machine where the error happens.</p>
  
  <p>Here are the results of running CompChecker on my box: </p>
  
  <p><img src="https://i.stack.imgur.com/RtbNg.png" alt="comp checker results on box"></p>
  
  <p>Registry info: ADODB.Connection has GUID HKEY_CLASSES_ROOT\CLSID{00000514-0000-0010-8000-00AA006D2EA4}</p>
  
  <p>InprocServer32 is %CommonProgramFiles%\System\ado\msado15.dll</p>