title: MySQL syntax error using Java in Eclipse
body: <p>I have the following prepared statement for sql  in Java :</p>
  
  <p>com.mysql.jdbc.JDBC4PreparedStatement@6e56103e:</p>
  
  <pre><code>INSERT INTO `game` (Id , GameStart ,Name, Lenght, MapVersion, Mode)VALUES(2502591,'2000-03-02 02:02:02','5x5 aptb wdw','00:55:48','DotA v6.75b.w3x','aptb ')ON DUPLICATE KEY UPDATE `Id`=VALUES(Id),`GameStart` = VALUES(GameStart),`Name`=VALUES(Name),`Lenght`=VALUES(Lenght),`MapVersion`=VALUES(MapVersion),`Mode`=VALUES(Mode).
  </code></pre>
  
  <p>When I execute it in Eclipse I get the following error:</p>
  
  <pre><code>com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?,?,?,?,?,?)ON DUPLICATE KEY UPDATE `Id`=VALUES(Id),`GameStart` = VALUES(GameSta' at line 1.
  </code></pre>
  
  <p>But at the same time when I execute the same query in SQLyog I don't get an error. Rows are updated. What can be a problem? Thanks in advance</p>
  
  <p>Code:</p>
  
  <pre><code>  Class.forName("com.mysql.jdbc.Driver");
      Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dota","root","root");
      PreparedStatement updateGame = null;
      String updatingGame = "INSERT INTO `game` (Id , GameStart ,Name, Lenght, MapVersion, Mode)" +
                  "VALUES(?,?,?,?,?,?)" +
                  "ON DUPLICATE KEY UPDATE " +
                  "`Id`=VALUES(Id),"+
                  "`GameStart` = VALUES(GameStart)," +
                  "`Name`=VALUES(Name)," +
                  "`Lenght`=VALUES(Lenght)," +
                  "`MapVersion`=VALUES(MapVersion)," +
                  "`Mode`=VALUES(Mode)";
      con.setAutoCommit(false);
      updateGame=con.prepareStatement(updatingGame);
                  updateGame.setInt(1, game.Id);
                  Timestamp timestamp = new Timestamp(100,2,2,2,2,2,2);
                  updateGame.setTimestamp(2,timestamp);
                  updateGame.setString(3, game.GameName);
                  updateGame.setTime(4, (Time) game.Time);
                  updateGame.setString(5, game.MapVersion);
                  updateGame.setString(6, game.Mode);
                  updateGame.executeUpdate(updatingGame);
  </code></pre>
  
  <p>And on:</p>
  
  <pre><code>updateGame.executeUpdate(updatingGame);
  </code></pre>
  
  <p>I get an error</p>