I could go along with a 'finish() called on a completed query' complaint,
but I've left code behind at client sites that uses $sth->finish() and is
unlikely to be updated or reviewed anytime in the foreseeable future.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
----- Original Message -----
From: "Tim Bunce" <[EMAIL PROTECTED]>
To: "Peter J. Schoenster" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2001 04:42
Subject: Re: executing atomic transactions in DBI
> On Fri, May 04, 2001 at 04:49:59PM -0600, Peter J. Schoenster wrote:
> >
> > eval {
> > my $sql = qq|INSERT INTO company_profile
> > (company_description,company_name,culture,employees,employer
> > _id,growth_rate,leadership,mission,sec_fillings_url,type,url,year)
> > VALUES(?,?,?,?,?,?,?,?,?,?,?,?)|;
> > my @vals = qw(sadfds 007_company_name sadfsadfsa 500 47
> > 91-100% sadfsad afsadf sdfdsa established sadfsadf 1965);
> > my $sth;
> > $sth= $dbh->prepare($sql);
> > $sth->execute(@vals);
> >
> > $sql = qq|UPDATE users set username = 'NOT' where f_id = ?|;
> > $sth= $dbh->prepare($sql);
> > $sth->execute('49');
> >
> > $sth->finish();
> > $dbh->commit;
> > };
>
> Out in the unix world there's a "Useless use of the cat command" award.
> I should probably invent one for "Useless use of the finish method".
> Ho hum.
>
> Meanwhile, maybe the next release of the DBI will rename finish() to
> cancel_select() and deprecate finish().
>
> Tim.
>