New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PreparedStatement with IN (array) doesn't work #149
Comments
Hi, I'm sorry, my answer to this StackOverflow question was wrong. I have fixed PreparedStatement prep = conn.prepareStatement( Does that answer your question? Regards, On Thursday, July 2, 2015, Rich DiCroce notifications@github.com wrote:
|
Yes, that works much better. Thanks Thomas! |
Per the answer to this StackOverflow question, it should be possible to pass an Object[] to PreparedStatement#setObject() to parameterize an IN clause.
However, using the latest 1.4.187, it doesn't work. As an example, running the below code prints nothing. It appears that H2 is interpreting the query as
which returns zero rows (note the extra set of parentheses), rather than the expected
H2 throws a parse exception if you attempt to "fix" this by removing the parentheses in the prepared statement, like this:
The text was updated successfully, but these errors were encountered: