title: How to make connection of oracle DB using 32bit ODBC via VBScript
body: <p>OS : Windows7
  DB : Oracle 11 Enterprise Release 11.2.0.4.0
  DSN: DSN created in ODBC in SYSWOW64</p>
  
  <p>I have a vbs file that connect to Oracle DB and execute a query and return the result based on which I do some action.</p>
  
  <pre><code>Call db_connect(curSession, "DSN=INTDB;UID=RAKHSH;PWD=fdfg4qprd;")
  
  strQuery="select count(*) from atmn.vc_run;"
  call db_execute_query(curSession, strQuery)
  
  intCount = db_get_rows_count_SQL(curSession, strQuery)
  
  Public Function db_connect( byRef curSession ,DSN)
  Set curSession = createobject("ADODB.Connection")
  curSession.connectionstring = DSN
  curSession.open
  
  if Err.Number = 0 then
      db_connect=1
  else
      db_connect=0
  end If
  End Function
  </code></pre>
  
  <p>I'm facing 2 problems:</p>
  
  <ol>
  <li><p>When I double click this vbs file, it shows an error of architecture mismatch.
  I found the below thread and when I open the CMD from syswow64 and execute the script it works fine but when I double click it shows error 
  <a href="https://stackoverflow.com/questions/2806584/how-do-i-run-a-vbscript-in-32-bit-mode-on-a-64-bit-machine">How do I run a VBScript in 32-bit mode on a 64-bit machine?</a></p></li>
  <li><p>I also need to run this from jenkin job using CSCRIPT, it shows the same message in jenkin console</p></li>
  </ol>
  
  <p>I have been googling various solutions since last 2 days but unable to find any.</p>