title: How do I declare a String array in a Java SQL declareParameter call?
body: <p>Simplified for illustrative purposes:</p>
  
  <pre><code>String[] filter = {"foo", "bar"};
  String sql = "SELECT * FROM table WHERE column IN ?";
  declareParameter(new SqlParameter(Types.ARRAY));
  </code></pre>
  
  <p>This doesn't work when I execute it (I get a <code>java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).</code> exception.</p>