[freetds] DBD:Sybase connect failure

Goldstein, Ian ian.goldstein at wachovia.com
Mon Jun 2 16:08:09 EDT 2008


Michael,

I can't thank you enough.... In hindsight, I am mad at myself for not
eliminating all necessary parameters to the connect string.

Thanks again for this and the other questions.

Ian


-----Original Message-----
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Michael Peppler
Sent: Monday, June 02, 2008 3:07 PM
To: FreeTDS Development Group
Subject: Re: [freetds] DBD:Sybase connect failure

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
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds



More information about the FreeTDS mailing list