[freetds] DBD:Sybase connect failure

Michael Peppler mpeppler at peppler.org
Mon Jun 2 15:07:03 EDT 2008


Goldstein, Ian wrote:

> my $db="testdb";
> my $user="xyz\\abcdg";
> my $pass="Apr-2008";
> my $dbh =
> DBI->connect("DBI:Sybase:server=sqlserver;database=$db,$user,$pass" ) ||
> die "Database connection not made: $DBI::errstr\n";
> 
> 
> When I run the script, I get the following error:
> 
> DBI
> connect('server=sqlserver;database=FACSOLAPCore,cibna\x582406,Apr-2008',
> '',...) failed: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY =
> (78) NUMBER = (34)
> Server sqlserver, database 
> Message String: Adaptive Server connection failed

The DBI->connect() call syntax is wrong.

You need:

$dbh = DBI->connect('dbi:Sybase:server=sqlserver', $user, $pass);

Michael
-- 
Michael Peppler           -                 Peppler Consulting SaRL
mpeppler at peppler.org      -                  http://www.peppler.org
Sybase DBA/Developer      -   TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ       -   http://www.peppler.org/FAQ/linux.html



More information about the FreeTDS mailing list