title: Oracle database query throws error on second run
body: <p>i have an VBA code where i am calling oracle to retrieve data twice using ODBC.
  First data retrieval is fine. But 2nd time it is saying ,</p>
  
  <pre><code>**RunTime Error '-2147467259 (80004005)'; Unspecified error**
  </code></pre>
  
  <p>My Code is as follows, </p>
  
  <blockquote>
    <p>Note: Same code works for connecting Teradata but failed when i use
    Oracle</p>
  </blockquote>
  
  <pre><code>'First Data retrieval
  Query1 = "Select TableName from all_tables"
  CmdSQLData.CommandText = Query1
  CmdSQLData.CommandType = adcmdText 
  CmdSQLData.Timeout=0
  set rs = CmdSQLData.Execute()
  'Then code to store data ...
  'This part gives proper result ...
  rs.close()
  
  'Second Data retrieval
  Query2 = "Select * from db.Event"
  CmdSQLData.CommandText = Query2
  CmdSQLData.CommandType = adcmdText 
  CmdSQLData.Timeout=0
  set rs = CmdSQLData.Execute() 'This line Gives Error - RunTime Error '-2147467259 (80004005)'; Unspecified error
  </code></pre>
  
  <blockquote>
    <p>Also i tried creating new command object as cmdSQLData1 but still same
    error</p>
  </blockquote>
  
  <p>May i know why the error is coming for second query ?
  There is no problem with query as i have tested in oracle directory.
  Please let me know</p>