title: Getting error while trying to write to DB
body: <p>I am currently facing a problem with writing to database table some info on java. I keep getting </p>
  
  <blockquote>
    <p>java.sql.SQLException: Missing IN or OUT parameter at index:: 1</p>
  </blockquote>
  
  <p>Note that the table is already created and exists.</p>
  
  <pre><code> public static void includeToDB(File file, String email) throws  Exception{
      Connection connection = null;
      PreparedStatement statement = null;
      ResultSet resSet = null;
      Date now = new Date();
  
      try {
          Class.forName("oracle.jdbc.driver.OracleDriver");
          connection = DriverManager.getConnection(CONNECTION_STRING, USERNAME, PASSWORD);
          String sql = "INSERT INTO T_EQ_STATEMENT_FILE_TRANS_LOG"
                  + "(SENTDATE, FILENAME, EMAIL) " + "VALUES "
                  + "("+ getCurrentTimeStamp() + "," + file.getName() + "," + email + ")";
               /*   "INSERT INTO CAMEL.T_EQ_STATEMENT_FILE_TRANS_LOG" +
                  "           VALUES (" +
                              now + "," +
                              file.getName() + "," +
                              email + ");";
                              */
          statement = connection.prepareStatement(sql);
          ResultSet resultSet = statement.executeQuery();
  
          if(resultSet.next()) {
              System.out.println("[DB_Handler] Information about sent file has been written to the DB... ");
          } else {
              System.out.println("[DB_Handler] Something went wrong, and writing the info has failed...");
          }
      } catch (SQLException e) {
          logger.error(EQSFT_ERROR_TYPE.SQL_EXCEPTION.getErrorToPrint(), e);
          logger.error("Messgage: " + e.getMessage());
          logger.error("Error code: " + e.getErrorCode());
          logger.error("SQL state: " + e.getSQLState());
      } catch (Exception e) {
          logger.error(EQSFT_ERROR_TYPE.UNKNOWN_EXCEPTION.getErrorToPrint(), e);
      } finally {
          if (statement != null) {
              statement.close();
          }
          if (connection != null) {
              connection.close();
          }
      }
  }
  </code></pre>