Skip to Content.
Sympa Menu

freetds - Re: [freetds] DBD:Sybase connect failure

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Goldstein, Ian" <ian.goldstein AT wachovia.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] DBD:Sybase connect failure
  • Date: Mon, 2 Jun 2008 16:08:09 -0400

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




Archive powered by MHonArc 2.6.24.

Top of Page