Brian Rowlands (Greymouth High School) wrote:
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/>

It looks like you need to execute a finalize. Could it be sth->finalize()? (I am not a Perl user).

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to