title: Passing array parameter in prepare statement - getting "java.sql.SQLFeatureNotSupportedException"
body: <p>I am facing error java.sql.SQLFeatureNotSupportedException in my prepare statement. I am using Mysql database.</p>
  
  <p>Below is my code.</p>
  
  <pre><code>class tmp {
  public static void main(String arg[]) {
  
      try {
          Class.forName("com.mysql.jdbc.Driver");
          Connection conn = DriverManager.getConnection(
                  "jdbc:mysql://localhost/sample", "root", "root");
          PreparedStatement pst = conn
                  .prepareStatement("select * from userinfo where firstname in(?)");
  
          String[] Parameter = { "user1", "Administrator" };
          Array sqlArray = conn.createArrayOf("VARCHAR", Parameter);
          pst.setArray(1, sqlArray);
          ResultSet rs = pst.executeQuery();
          while (rs.next()) {
              System.out.println(rs.getInt(1));
          }
      } catch (Exception e) {
          e.printStackTrace();
          }
      }
  }
  </code></pre>