title: VBA Query using ADODB returning different results on different computers
body: <p>In VBA macro in Excel I have an issue where the exact same query with the exact same database credentials are returning different results depending on what computer the script is being executed.  Some pull all of the correct results, others have results missing.</p>
  
  <p>If we execute the query using Toad or any other tool that can execute oracle it has worked correctly on every machine tested.</p>
  
  <p>So far we have found out that the following things are not causing the issue:</p>
  
  <ul>
  <li>Oracle Driver version (instant client vs full both tested no correlation found)</li>
  <li>Excel versions (everyone at my company has the same build of excel)</li>
  <li>VBA project references are the same. </li>
  <li>Confirmed all machines are pointing to the correct database.</li>
  <li>ODBC Settings are the same</li>
  </ul>
  
  <p>All machines tested are running Excel 2010 on windows 7, The Database is Oracle 11, </p>
  
  <p>Here is the script</p>
  
  <pre><code>Dim cn
  Set cn = CreateObject("ADODB.Connection")
  Dim rs
  Set rs = CreateObject("ADODB.Recordset")
  cn.ConnectionString = "DSN=#####;UID=####;PWD=#####;DBQ=######;DBA=W;APA=T;EXC=F;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;BTD=F;BNF=F;BAM=IfAllSuccessful;NUM=NLS;DPM=F;MTS=T;MDI=F;CSR=F;FWC=F;FBS=64000;TLO=O;MLD=0;ODA=F"`  
  
  `cn.Open`
  
  `Set rs = cn.Execute(SQLfinal)`
  
  Dim iCol As Integer
  Dim iRow As Integer
  
  fldCount = rs.Fields.Count
  For iCol = 1 To fldCount
      Sheets("8. Data").Cells(12, iCol).Value = rs.Fields(iCol - 1).Name
  Next    
  Sheets("8. ####").Cells(13, 1).CopyFromRecordset rs 
  rs.Close
  
  Set rs = Nothing
  cn.Close
  
  Rows("12:12").Select
  Selection.AutoFilter
  With Selection.Interior
      .Pattern = xlSolid
      .PatternColorIndex = xlAutomatic
      .ThemeColor = xlThemeColorAccent1
      .TintAndShade = 0.599993896298105
      .PatternTintAndShade = 0
  End With
  </code></pre>