title: Updating Oracle Table from Excel VBA Macro using ODBC connection
body: <p>I have a sheet in Excel 2010 which pulls data in QueryTables from an Oracle database, connected via an ODBC DSN.</p>
  
  <p>I need to take data from the spreadsheet and use it to update a table in the same Oracle database.  I cannot do an update from a QueryTable, but that is the only connection method I have been able to get to work with the ODBC.</p>
  
  <p>I have tried setting up a ADODB connection, but I am getting a </p>
  
  <pre><code>'Run-time error '-2147467259 (80004005'):
  
  Automation error
  Unspecified error
  </code></pre>
  
  <p>Here is the code I used:</p>
  
  <pre><code>Sub Upload_Click()
      Dim cn As ADODB.Connection
      Set cn = New ADODB.Connection
  
      With cn
          .Provider = "MSDASQL"
          .ConnectionString = "DSN=xcognosD;"
          .Open
      End With
  
      cn.Close
  End Sub
  </code></pre>
  
  <p>Added note, I am on Windows 7 using a 64 bit odbc driver, connecting to Oracle 11 database.</p>