----- Original Message -----
From: SELVARAJAN,DANESH K (Non-HP-PaloAlto,ex1)
<[EMAIL PROTECTED]>
To: 'Tim Bunce' <[EMAIL PROTECTED]>; Ken Speich <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, May 05, 2001 12:26 AM
Subject: RE: Prepare/Finish question


Hmm, I dont think you need to explain this to Tim... he wrote DBI :-).
But the gesture is nice and shows the manual actually is clear at this
point....





> Hi Tim,
>
> $sth->finish
>
> This Indicates that no more data will be fetched from this statement
before
> it is either prepared again or destroyed and to allow the server to free
up
> any internal resources (such as read locks) currently being held. It does
> not affect the transaction status of the session.  There's no need to call
> finish if you're about to destroy or re-use the statement handle.
>
> Basically use "finish" to remove resources . I hope this will help you .
>
> Regards
>
> Dan.
>
>
>
> -----Original Message-----
> From: Tim Bunce [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 04, 2001 2:42 PM
> To: Ken Speich
> Cc: [EMAIL PROTECTED]
> Subject: Re: Prepare/Finish question
>
>
> On Fri, May 04, 2001 at 01:59:05PM -0400, Ken Speich wrote:
> > Does a $sth->finish; close out a $dbh->prepare()?
> >
> > For example, if I do the following:
> >
> > $sql = "select sysdate from dual";
> > $sth = $dbh->prepare($sql);
> >
> > while(1) {
> > $sth->execute
> >
> > (Do some stuff here)
> >
> > $sth->finish
> > }
> >
> >
> > Does $sth->finish make the query go away?  Do I even wanna put that in
> > there?  I want the prepared statement to stick around, because I am
going
> > to be running it indefinitely... if I execute it again, does the new
> > dataset just overrun the old one?
>
> Is the manual unclear?
>
> Tim.

Reply via email to