Christophe wrote:

> I am pretty new with mod_perl and I have the following runtime error :
>
> Database handle destroyed without explicit disconnect at
> /usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Registry.pm line 144.
> [Tue Oct  3 22:33:58 2000] [error] Can't call method "errstr" on
> unblessed reference at ./libdb.pl line 35.
>
> What is "unblessed reference" ???
>
> Before it was working. I do not know why it is not working anymore...
> Here is the code around my line 35...
>
> &ConnexionDB("db_test", "localhost", "user", "password", \$dbh, 1);
> if ($action eq "question"){
>     &enregistre(\$dbh, $question, $nomdemandeur, $courriel, $location,
> $langue);
> }
>
> thanks for any help...

hi chistophe
About DBI:
1:    When you use DBI, you have to call $dbh->disconnect before the $dbh
goes out of scope to avoid this warning.

2:    If you have a running statement ( eg: you've made a "select * from
youtTable" and you've not fetch all rows ) you'll also have to call
$sth->finish before calling $dbh->disconnect()  ) to avoid another
warning




Reply via email to