title: Connecting VB Script and SQL Plus , passing value to Query
body: <p>After reading from a text file , I am trying to connect to SQLplus with a value stored in a variable and trying to update a table but I am getting below error : " Unterminated String constant
  Here is what code looks like, thanks to Guido for helping me out on Step 1.
  Can anyone please point out the error . Some error inside If &amp; Else Part , the SQL query or connection is wrong</p>
  
  <pre><code>dim fs, txt, line, yesno , cust_id
  set fs = CreateObject("Scripting.FileSystemObject")
  set txt = fs.OpenTextFile("E:\batchfiletest\Eapp3\scotia1.txt", 1, false) 
  
  ' loop through all the lines
  do while not txt.AtEndOfStream
      line = txt.readLine
  
  ' read the character and store it in a variable
      yesno = Mid(line, 127, 1)
      cust_id = Mid(line, 1,20)   
  
  ' execute the correct query
      if yesno = "Y" then
  
      set WshShell = CreateObject("WScript.Shell")
      set oEnv=WshShell.Environment("Process") 
      cmdString = "E:\oracle\product\10.2.0\db_1\BIN\sqlplusw.exe -S sysman/csaadmin@convcsd
  
      UPDATE csa_sli_all.T_CONV_quote set HOLD_CODE = 'CAQ' where quote_id =  cust_id ;
      commit;"
  
      Set oExec = WshShell.Exec(cmdString)
  
       ELSE  
      set WshShell = CreateObject("WScript.Shell")
      set oEnv=WshShell.Environment("Process") 
      cmdString = "E:\oracle\product\10.2.0\db_1\BIN\sqlplusw.exe -S sysman/csaadmin@convcsd
  
      UPDATE csa_sli_all.T_CONV_quote set HOLD_CODE = 'PVQ' where quote_id =  cust_id ;
      commit;"
  
      Set oExec = WshShell.Exec(cmdString)
  
      end if
  loop
  MsgBox "Press OK to close when done reading the output."
  </code></pre>