Hi,

Actually, within the same session, if you use the exact same SQL statement,
then the prepared statement is also re-used. But it's much better to re-use
the same PreparedStatement object.

Regards,
Thomas




On Wed, Jun 4, 2014 at 11:55 AM, Noel Grandin <noelgran...@gmail.com> wrote:

>
> On 2014-06-03 08:37 PM, Adam McMahon wrote:
>
>>
>> Now lets say that I want to later reuse that prepared statement, which is
>> more accurate:
>>
>> 1) do I need to keep a reference to the actual PreparedStatment object
>> (in this case "ps").
>>
>
> Yes.
>
>
>  If this is the case, do I not close the prepared statement?
>>
>
> No, you do not close it.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to