in reply to DBI issue

The error means that your $dbh variable is undefined. Since earlier you probably create your database connection and define this variable, it means a few possible problems: You should check the status of the server using command line tools to make sure that you can access it (authenticated if necessary). If the user and password have changed, that's easily fixed in your script, otherwise, you need to make sure your DB server is operating properly.

-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important

Replies are listed 'Best First'.
Re: Re: DBI issue
by IlyaM (Parson) on Nov 29, 2001 at 00:58 UTC
    I want to add that if you were checked what returns DBI->connect then the reason of this problem would be obvious to you. Something like:
    my $dbh = DBI->connect(....) or die $DBI::errstr;

    Another option for handling of DBI errors is usage of exceptions. DBI->connect has option RaiseError which can enable thowing exceptions if there exist any problem.

    my $dbh = DBI->connect($dsn, $user, $password, { RaiseError => 1 });
    In former case you don't need to check what DBI->connect returns. Instead you should put this code inside eval block if you want to handle errors.