Nice one Clark. Worked a treat.
-----Original Message----- From: Clark Christensen [mailto:[EMAIL PROTECTED] Sent: Thursday, 11 October 2007 5:47 a.m. To: sqlite-users@sqlite.org Subject: Re: [sqlite] Most basic of questions As you've discovered, $sth->finish doesn't quite do the job. I've found if I simply undef $sth; before disconnecting, it eliminates the message about closing $dbh with active statement handles. -Clark ----- Original Message ---- From: Brian Rowlands (Greymouth High School) <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Wednesday, October 10, 2007 1:48:49 AM Subject: [sqlite] Most basic of questions Hi I'm absolutely new to sqlite which I'm using with a perl project. I did a test script: use strict; use DBI; my $dbfile = 'H:\trythis.s3db'; my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","","",{RaiseError => 1}); my $sql = "SELECT name FROM Fields ORDER BY name"; my $sth = $dbh->prepare($sql); if (defined($sth)) { $sth-> execute(); my @row; while (@row = $sth->fetchrow_array()) { print "$row[0]\n"; } } sth->finish(); $dbh->disconnect(); Can someone kindly tell me why I get displayed: "closing dbh with active statement handles at H:\Testing sql.pl line 25? By that I mean which it is necessary to have it displayed? Does it have to be so or can I somehow cause it not to appear? I'm awaiting a book "The definitive guide to SQLite" to study but in the meantime I'd appreciate the help from some kind soul. Thanks Brian Rowlands We must accept finite disappointment, but we must never lose infinite hope. Martin Luther King Jr. </quotes/k/martinlutherking/> ------------------------------------------------------------------------ ----- To unsubscribe, send email to [EMAIL PROTECTED] ------------------------------------------------------------------------ ----- ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------