- $dbh = DBI->connect("DBI:ODBC:$dsn",$user,$password)
- my $statement=$dbh->prepare(q{select count(*) Total from tab;});
- $statement->execute() or die "executing: ", $dbh->errstr;
- my $rowq = $statement->fetchrow_arrayref->[0];
- $dbh->disconnect;
DBI::db=HASH(0x1d56afc)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnectin
g) at chb.pl line 6.
to avoid this you should add $statement->finish();
- $dbh = DBI->connect("DBI:ODBC:$dsn",$user,$password)
- my $statement=$dbh->prepare(q{select count(*) Total from tab;});
- $statement->execute() or die "executing: ", $dbh->errstr;
- my $rowq = $statement->fetchrow_arrayref->[0];
- $statement->finish();
- $dbh->disconnect;
Aucun commentaire:
Enregistrer un commentaire