title: "Invalid column index" SqlException error when trying to insert a row
body: <p>I'm having a problem with setting up a <code>PreparedStatement</code> to insert a new row into my table. I've tested the query in my SQL editor and it worked succesfully but I can't get this PreparedStatement to work.</p>
  
  <pre><code>String sql = "INSERT INTO table game(gamedate, type, world) values (TIMESTAMP '?', ?, '?');"
  runQuery(sql, date, type, world); 
  </code></pre>
  
  <p>...</p>
  
  <pre><code>protected runQuery(String sql, Object... params){
  try {
    initiateConnection();
    PreparedStatement statement = connection.PrepareStatement(sql);
  
      int i = 1;
      for (Object p : params){
         statement.setObject(i, p);
         i++;
       }
     statement.executeUpdate();
  } catch (Exception ex){
  
  } finally {
   //close up things
  }
  }
  </code></pre>
  
  <p>I added in some println() to test the output and it seemed to all be pretty okay</p>
  
  <pre><code>sql: INSERT INTO game(gamedate, type, world) values(TIMESTAMP '?', ?, '?');
  date: 2012-03-13 21:42:14
  type: 1
  world: test
  </code></pre>
  
  <p>The error I get is </p>
  
  <blockquote>
    <p>java.sql.SQLException invalid column index</p>
  </blockquote>
  
  <p>I'm really quite stumped here. Any idea what's the culprit here?</p>