Maximum Parameters for PreparedStatement
I don't remember the specifics, because I made a workaround -- but --
When using the PreparedStatement
, is there a way ofINcreasing the maximum number of parameters that can be passed in?
I'd gotten some error message on the 12th parameter saying that I'd gone over the maximum. The error went away when I made some of the parameters to be part of the query string itself (you know, sql +="and column = " + column
) instead of using the "?" place-marker.
Now, I can understand there being an upper limit -- but 12 seems like anAWFULLYlow limit -- unless I messed up somewhere else? Or there's a way to increase that limit that I couldn't find?
Thoughts anyone?
[752 byte] By [
Unca_Albya] at [2007-11-27 5:38:01]

# 1
The limit on the number of ? you can put into a PreparedStatement is larger than 12 -- I have exceeded that myself -- unless you're working with a really poor JDBC driver. The limit of the number of parameters you can apply is the number of ? you put into the PreparedStatement, and in fact you must apply exactly that number of parameters.
So my conclusion is that you messed up somewhere else.
# 3
> Well, I'm unable to reproduce the problem, so I have
> no idea what happened.
That sort of thing happens.
> So I'm just going to go ahead have give you the Duke
> points and see what other heartburns I run into later!
They never stop coming, I can tell you after programming since the Ice Age.