title: VBA/MySQL issue using ODBC connector
body: <p>I have been struggling with this for a few days now. Any help much appreciated.</p>
  
  <p>Trying to connect to MySQL database using Excel VBA, on a PC with the following:</p>
  
  <p>Excel 2007
  Windows 7 x64 Home Premium
  MySQL 5.5
  MySQL ODBC Connector 5.1, 64 bit</p>
  
  <p>In the Excel VBA I have referenced Microsoft ActiveX Objects 2.8 Library.</p>
  
  <p>The VBA I am using to connect is:</p>
  
  <pre><code>Dim oConn As ADODB.Connection
  Public Sub ConnectDB()
      Set oConn = New ADODB.Connection
      oConn.Open "DRIVER={MySQL ODBC 5.1 Driver};" &amp; "SERVER=localhost;" &amp; "DATABASE=test;" &amp; "USER=root;" &amp; "PASSWORD=PWhere;" &amp; "Option=3"
  End Sub
  </code></pre>
  
  <p>Every time I run this I get the error dialog: "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"</p>
  
  <p>MySQL service is definitely running.</p>
  
  <p>I have used Windows Data Source Administrator to check that MySQL ODBC Connector 5.1 is present and correct: it is, checks out OK when I try to create a DSN in this way.</p>
  
  <p>Looking through the VBA project reference options, I note the options to reference a whole host of different ADO Libraries, including (Multi-dimensional) options and library versions 2.0,2.1,2.5,2.6,2.7, and 6.0 - maybe the answer lies in one of these?</p>
  
  <p>Any more details required, let me know.</p>