On Mar 28, 6:14 pm, Aivar <[email protected]> wrote:
> > > Just had to get rid of my manual PreparedStatement pooling. I just
> > > didn't know about JDBC statement pooling :)
>
> > Neither I did. Is there something like this? IMHO, it's just that "A
> > ResultSet object is automatically closed when the Statement object
> > that generated it is closed, re-executed, or...".
>
> I read about it from 
> here:http://www.ibm.com/developerworks/java/library/j-jdbcnew/
> Previously I was caching PreparedStatements for reuse The problem was
> that sometimes I was reusing a PreparedStatement when its ResultSet
> was not finished. Turns out that JDBC does similar kind of caching
> under the hood, so that when I do several times:

That's funny news, actually 10 years old, nonetheless new for me. And
quite strange. I don't get it; it's JDBC 3.0, but doesn't it mean you
need also a JDBC 3.0 driver in order for that to work?

>   prepareStatement(sql)
> then only first time the query needs to be is compiled.

How did you find out that it actually doesn't get compiled each time?

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to