title: Excel VBA - Oracle DB Connection - Execution of Update Query not working
body: <p>I'm using Excel VBA to connect with an Oracle DB and run some queries. I've ran some complex select queries and it works fine. But it unable to run a simple Update query. When I run the query, the application hangs and the query isn't executed (I have checked the DB and don't see any updates to it). The update query runs fine when I execute it using SQL developer. Please help. Following is the code - </p>
  
  <pre><code>Sub checkupd()
  
  strDriver = "Microsoft ODBC for Oracle"
  strHost = ThisWorkbook.Sheets("Querygen").Cells(3, 17).Value
  strPort = ThisWorkbook.Sheets("Querygen").Cells(4, 17).Value
  strUser = ThisWorkbook.Sheets("Querygen").Cells(5, 17).Value
  strPassword = ThisWorkbook.Sheets("Querygen").Cells(6, 17).Value
  strSID = ThisWorkbook.Sheets("Querygen").Cells(7, 17).Value
  
  'Connection String
  strCon = strCon &amp; "CONNECTSTRING=(DESCRIPTION="
  strCon = strCon &amp; "(ADDRESS=(PROTOCOL=TCP)"
  strCon = strCon &amp; "(HOST=" &amp; strHost &amp; ")(PORT=" &amp; strPort &amp; "))"
  strCon = strCon &amp; "(CONNECT_DATA=(SID=" &amp; strSID &amp; "))); "
  strCon = strCon &amp; "uid=" &amp; strUser &amp; ";pwd=" &amp; strPassword &amp; ";"
  
  strQueryup = "UPDATE DM_RESERVE SET COL1 = 'new3'"
  strQueryup = strQueryup &amp; " WHERE PROD IN ('123','456')"
  
  
  Set conn = CreateObject("ADODB.Connection")
  conn.Open strCon
  
  conn.Execute strQueryup 
  
  
  MsgBox ("Update Query executed")
  
  
  conn.Close
  
  
  Set conn = Nothing
  End Sub
  </code></pre>