title: ORA-00903: invalid table name on PreparedStatement
body: <p>I have a method that will execute a query with a list of QueryParameters for the prepared statement. The <code>HelperConnection</code> and <code>QueryParameter</code> are just small java beans and should be self-explanatory based on the <code>get</code>s you see here. I'm try to do a <code>select * from dual</code> using, instead a <code>select * from ?</code> where the <code>QueryParameter</code> is a STRING type and the value is <code>dual</code>. However, I'm getting a <code>java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name</code> error. My code and output are below. What's up?</p>
  
  <pre><code>public static ResultSet executeQuery(HelperConnection helperConnection, String query, QueryParameter... params) throws SQLException {
    System.out.println("The connection is: " + helperConnection.getJdbcURL());
    System.out.println("The query is: " + query);
    if (params.length &gt; 0) {
      System.out.println("The QueryParameters are:");
      System.out.println("\t" + StringHelper.splitBy(StringHelper.newline + "\t", params));
    }
    Connection conn = helperConnection.createOracleConnection();
    PreparedStatement pstmt = conn.prepareStatement(query);
    for (int i = 1; i &lt;= params.length; i++) {
      QueryParameter param = params[i - 1];
      switch (param.getType()) {
        //Other cases here
        case QueryParameter.STRING:
          pstmt.setString(i, param.getValue());
          break;
      }
    }
  
    ResultSet rs = pstmt.executeQuery();
    conn.commit();
    return rs;
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>The connection is: //.....My connection
  The query is: select * from ?
  The QueryParameters are:
      String - dual
  </code></pre>