On Tue, Aug 15, 2000 at 03:26:03PM +0400, Vladislav Safronov wrote: > Hi, > > Could you have a look at the lines and answer the question .. > --- > sub foo { > my $dbh = shift; > > my $sql = ... > > my $sth = $dbh->prepare($sql); > $sth->execute; > $sth->finish; > } > === > Do I always need to call $sth->finish? You *never* need to call finish on non-select statements. (If you do, it's a driver bug.) > Wouldn't it be automaticly called when > sub foo ends (when my variable $sth get destroyed)? Finish marks the end of *fetching*, not the end of life of the handle. Reread the DBI 1.14 docs on finish and tell me if anything is unclear. Tim. p.s. If someone asked me what I'd change about the DBI I was to rewrite it, I'd probably just say "rename finish to cancel_select".
- HTML Template Comparison Sheet ETA Gunther Birznieks
- Re: HTML Template Comparison Sheet ETA Perrin Harkins
- Re: HTML Template Comparison Sheet ETA Matt Sergeant
- Content negotiation Was: Re: HTML ... David Hodgkinson
- Question about $sth->finish... Vladislav Safronov
- Re: Question about $sth-&g... Matt Sergeant
- RE: Question about $s... Vladislav Safronov
- RE: Question abou... Matt Sergeant
- Re: Question about $s... Keith G. Murphy
- Re: Question abou... Matt Sergeant
- RE: Question about $sth-&g... Tim Bunce
- RE: Question about $s... Vladislav Safronov
- Re: HTML Template Comparison Sheet... Drew Taylor
- Re: HTML Template Comparison S... Nelson Correa de Toledo Ferraz
- Re: HTML Template Comparis... Drew Taylor
- Re: HTML Template Comparis... Sam Tregar
- Re: HTML Template Com... Nelson Correa de Toledo Ferraz
- Re: HTML Template... Matt Sergeant
- Re: HTML Temp... brian moseley
- Re: HTML Temp... Matt Sergeant
- Re: HTML Temp... brian moseley