title: executeUpdate() only giving return value as 1
body: <p>i have earlier asked the same ques , didnt get the answer 
  i am updating a row in database from front end but i always get return value as 1
  whether or not query is updating , i intentionally try to insert a wrong value or try to violate a constraint , i get exception at backend but the return value is always 1</p>
  
  <p>java code :</p>
  
  <pre><code> public int editportal(String env,String region,String url,String user,String rnode,String password,int envid,String attuid) throws Exception
     {
      int Affected=0; 
      log.debug("[Editconsole Method Call]");
  
       try {
        Connection con = db.getConnection();
        String editquery = "update ENV_MOTS_DETAILS set " +
              "ENV_NAME= ? , CONSOLE_URL= ? , REMOTE_NODE= ? , CONSOLE_TO_LOGON=? , " +
              "REGION=? , DELETE_FLAG='Y' , ADMIN_PWD=? , " +
              "COMPONENT='' , COMMENTS='' , LAST_UPDATED_BY=?, " +
              "LAST_UPDATED_ON=to_date(to_char(SYSDATE,'YYYY-MM-DD HH24:MI:SS'),'YYYY-MM-DD HH24:MI:SS') WHERE ENV_ID = ?";
  
        log.info("[Editconsole Method Call Query]"+editquery);
  
        PreparedStatement ps1 = con.prepareStatement(editquery);
  
        ps1.setString(1,env);
        ps1.setString(2,url);
        ps1.setString(3,rnode);
        ps1.setString(4,user);
        ps1.setString(5,region);
        ps1.setString(6,password);
        ps1.setString(7,attuid);
        ps1.setInt(8,envid);
  
       Affected = ps1.executeUpdate();
  
       log.info("Statement affected " + Affected + " rows");
       ps1.close();
       con.close();
  
      } 
       catch (Exception e) 
       {
          log.fatal("[SQL Exception in Edit Server Details]"+e.getMessage());
          throw e;
  
        }
      return Affected;      
   }
  </code></pre>
  
  <p>stack trace when i intentionally try to get an error or return value as 0</p>
  
  <p>java.sql.SQLException: ORA-12899: value too large for column "INFRAJEWL"."ENV_MOTS_DETAILS"."ADMIN_PWD" (actual: 147, maximum: 50)</p>
  
  <pre><code>    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
      at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
      at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
      at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
      at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
      at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
      at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
      at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
      at com.amdocs.infraportal.query.GetServerInfoDao.editportal(GetServerInfoDao.java:202)
      at com.amdocs.infraportal.servlets.Edit.doPost(Edit.java:45)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
  </code></pre>