|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: $DBI::errstr never holds any value
Date: Apr 6 2005 7:41PM
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 - mpeppler@peppler.org - http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
|