title: Strange problem in VB6 in generation of executable
body: <p>I there</p>
  
  <p>I have this scenario:</p>
  
  <p><strong>a)</strong> Notebook :Windows Server 2008 R1, Visual basic 6 with all service pack.</p>
  
  <p><strong>b)</strong> Desktop : Windows Server 2008 R1 (recently update to sp1, i dunno if it is the guilty), Visual basic 6 with all service pack.</p>
  
  <p><strong>c)</strong> Client machine (Windows XP)</p>
  
  <p>I created an executable in <strong>a)</strong> and installed it in <strong>c)</strong>. It uses ADO (msado15.dll) and it works fine in <strong>a)</strong> and in <strong>C)</strong> </p>
  
  <p>Then, using the same code, i tried to do the same in <strong>b)</strong> (compiling in <strong>b)</strong> ) and it work in <strong>b)</strong> but it fail in <strong>c)</strong>.   I verified that it is the same code in <strong>a)</strong> and in <strong>b)</strong></p>
  
  <p>In resume:</p>
  
  <p>A machine</p>
  
  <ul>
  <li>executable_compiled_in_a.exe  WORKS</li>
  <li>executable_compiled_in_b.exe  WORKS</li>
  </ul>
  
  <p>B machine</p>
  
  <ul>
  <li>executable_compiled_in_a.exe  WORKS</li>
  <li>executable_compiled_in_b.exe  WORKS</li>
  </ul>
  
  <p>C machine (customer machine)</p>
  
  <ul>
  <li>executable_compiled_in_a.exe  WORKS</li>
  <li>executable_compiled_in_b.exe  FAIL!</li>
  </ul>
  
  <p>The error message is</p>
  
  <blockquote>
    <p>Class does not support Automation or does not support expected interface </p>
  </blockquote>
  
  <p>and is trigged by the line</p>
  
  <pre><code>Set Data = New ADODB.Connection
  </code></pre>
  
  <p>So, i don't get it what is the trouble, both uses the same reference but <strong>b)</strong> generated a different executable.</p>
  
  <p>ps: MSDAC_TYP DOES NOT WORK IN XP and it is not a problem of MSDAC because the executable generated in a) works in c).</p>
  
  <p>ps2: i also tried using msado27.tlb and msado28.tlb with the same results.</p>
  
  <p>ps3: my developers machines (a) and b) ) are 64bits, while the customer machine is 32bits.</p>
  
  <p>Thanks.</p>
  
  <h2>Update</h2>
  
  <p>The latest service of Windows Server 2008 R1 (and i think the same for Windows 7) update the version of ADO and the executables.   Short story, the latest SP1 is evil and will bring a lot of trouble, at least for ADO and development machines.</p>
  
  <p>msado15.dll without service pack 6.1.7600</p>
  
  <p>msado15.dll with service pack 6.1.<strong>7601</strong></p>