Re: $DBI::errstr never holds any value

Michael Peppler <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
On Wed, 2005-04-06 at 21:36, Wechsler, Steven wrote:
> Behold the following code snippet:
> 
>         $dbh = DBI->connect("dbi:Sybase:server=$server", $login,
> $srvpassword,
>                             {PrintError => 0});
>         if (! $dbh) {
>             print "Can't connect to $server: $DBI::errstr\n";
>             $error = 1;
>             next server;
>         }
> 
> I never get a value from $DBI::errstr (in the case that I'm trying,
> the reason is a wrong password). What am I doing wrong?

Nothing - I've noticed the same problem recently - any error/warning
messages from Sybase during the login process are dropped.

Something that I need to look in to.

In the meantime I think that you can catch messages with a
syb_err_handler during the login phase.

Michael
-- 
Michael Peppler  -  [email protected]  -  http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.