title: error : ORA-01858: a non-numeric character was found where a numeric was expected
body: <p>When i execute my prepared statement i am getting the <code>ORA-01858: a non-numeric character was found where a numeric was expected</code>. When i searched through some forums, they say it is because of the date datatype. My prepared statement is </p>
  
  <pre><code>insert  into OPRS_ZONES(
    ZONE_ID,
    ZONE_CODE,
    ZONE_NAME,
    PLACE_ID,
    CORP_ID,
    CREATED_BY,
    CREATED_DATE,
    MODIFIED_BY,
    MODIFIED_DATE) 
  values(?,?,?,?,?,?,?,?,?)
  </code></pre>
  
  <p>The values i am trying to insert are </p>
  
  <pre><code>03.0, 
  'FLORIDA', 
  'FLORIDA', 
  05231.0, 
  01.0, 
  01.0, 
  TO_DATE('19102012130639','DDMMYYYYHH24MISS'), 
  NULL, 
  NULL
  </code></pre>
  
  <p>Table Definition</p>
  
  <pre><code>CREATE TABLE OPRS_ZONES ( 
    ZONE_ID NUMERIC(20,0) , 
    ZONE_CODE VARCHAR2(16) , 
    ZONE_NAME VARCHAR2(255) , 
    PLACE_ID NUMERIC(20,0) , 
    CORP_ID NUMERIC(20,0) , 
    CREATED_BY NUMERIC(20,0) , 
    CREATED_DATE DATE , 
    MODIFIED_BY NUMERIC(20,0) , 
    MODIFIED_DATE DATE );
  </code></pre>
  
  <p>The code where i am populating the values for prepared statement,</p>
  
  <pre><code>public int executePreparedStatement(String query, List myCollection, int colLength, String tableName) throws DBException,SQLException {
  
          int rowsAffected    = 0; 
          int [] noOfRowsExecuted = null;
          try{
              conn.setAutoCommit(false);
              if(query != null){  
                  ps = conn.prepareStatement(query);
                  for (int i = 0; i &lt; myCollection.size(); i++) {
                      logger.info("@@mycollcetion -- "+myCollection.get(i));
                      List list = (List) myCollection.get(i);
                      int count = 1;
                      for (int j = 0; j &lt; list.size(); j++) {
                          ps.setObject(count, list.get(j));
                          count++;
                      }
                      ps.execute();
                      logger.info("@@ noOfRowsExecuted == "+noOfRowsExecuted);
                  }
              }
          }catch(Exception e){
              logger.error("Error in the execution of Prepared Statement: \n" + query + "\nData : " + listData, e);
              rowsAffected    = Utility.getErrorCode(e);
              throw new DBException(e);
          }finally{ 
              try {
                  if (ps != null) {
                      ps.close();
                      ps = null;
                  }
              } catch (Exception e) {
              }
              rowsAffected    = 0; 
              noOfRowsExecuted = null;
          }
          return rowsAffected;        
      }
  </code></pre>
  
  <p>The <code>list myCollection</code> contains the <code>values</code>. The variabele <code>query</code> is the <code>prepared statement</code> 
  This prepared statement when replaced with values works fine in SQLDEVELOPER, but when i run through my java program i'm getting error. Is this really problem with date format ? if so why is it working fine in SQLDEVELOPER ?</p>
  
  <p>Please help,</p>
  
  <p>Thanks</p>