I prefer only to use a new statement - not a new connection. But I'm not sure, whether a new connection has advantages. I guess it will consume more time.
Another idea, (which might not fit) would be to get the possible states in the same first query (if there aren't too much) and cache them, and select the right one after the user made his decision.
Are you getting all the 20 questions in one go ? I mean, are you using the resultset to return you all 20 questions. You display them on the JSP and then the user picks up one of them ? If that is the case, when the user picks up some other state, you can just fire another query using a Statement object.
-G
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.