db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <de...@segel.com>
Subject RE: prepared statements
Date Tue, 27 Feb 2007 01:47:14 GMT


> -----Original Message-----
> From: Amir Michail [mailto:amichail@gmail.com]
> Sent: Monday, February 26, 2007 7:16 PM
> To: Derby Discussion
> Subject: Re: prepared statements
> 
> On 2/26/07, Dag H. Wanvik <Dag.Wanvik@sun.com> wrote:
> > "Bernt M. Johnsen" <Bernt.Johnsen@Sun.COM> writes:
> >
> > > Hi,
> > >
> > >
> > > This behaviour is defined in the JDBC specification.
> >
> > But Derby's statement cache works across connections, which alleviates
> > redundant statement compilation.
> >
> 
> I ran into a connection lost exception and I had no idea why. It
> wasn't obvious that this was the reason from the error given. Also,
> it's not obvious why you would want to prevent sharing of prepared
> statements across connections.
> 
> Amir
> 
>
This isn't a derby thing but a *java* thing. As well, it's a database thing.

In fact, think about it from a database perspective. If you could
disassociate a prepared statement from the connection, how do you control
the prepared statement. Meaning how do you know when you no longer need a
prepared statement.




Mime
View raw message