On Fri, 3 Jan 2003 03:01:23 +0200 Boris Penchev <[EMAIL PROTECTED]> wrote:
> I think that if you use prepare and execute method, you must use finish. > I had problems before in one my script, because i forgot to insert it. finish() is only necessary if you don't fetch all the rows from a statement handle. >From the fine manual (http://xmlproj.com/fom-serve/cache/49.html): Indicates that no more data will be fetched from this statement handle before it is either executed again or destroyed. The finish method is rarely needed, but can sometimes be helpful in very specific situations to allow the server to free up resources (such as sort buffers). > ----- Original Message ----- > From: "Jeff Thies" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, January 03, 2003 2:21 AM > Subject: $sth->finish > >> I've writen a lot of DBI code (CGI) for *nix/MySQL and never worried >> about closing statement handles: $sth->finish(). I assumed that when the >> script was done and it would tidy this up. >> >> Is this different on the windows/Access side? Is this something I >> should have been doing all along on *nix? >> >> Should I worry about closing the database handle? It's much safer to disconnect() at the time of your choosing rather than letting it happen during global destruction. -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.