title: Not able to connect to Oracle DB using excel VBA
body: <p>I am trying to connect to Oracle Database, using Excel VBA, but not able to connect. Any guidance is welcome.</p>
  <pre><code>Sub connection()
  
  Dim cn As ADODB.connection
  Dim rs As ADODB.Recordset
  
  Set cn = New ADODB.connection
  Set rs = New ADODB.Recordset
  
  constr = &quot;Driver={Microsoft ODBC for Oracle}; CONNECTSTRING=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=&lt;HostName&gt;)(PORT=&lt;port&gt;))(CONNECT_DATA=(SID=&lt;sid&gt;))); uid=&lt;UserName&gt;; pwd=&lt;Password&gt;;&quot;
  
  cn.Open (constr)
  
  End Sub
  </code></pre>
  <p>When trying to debug, it's giving the below error at Open Connection.</p>
  <p>Automation Error
  Unspecified Error</p>
  <p><a href="https://i.stack.imgur.com/aef1k.png" rel="nofollow noreferrer">Error While Creating the Database connection</a></p>