in reply to Perl 5.20 Sybase 15.7 connect to database error

Your DSN string should start with "dbi:Sybase".

However, when in Windows, it's often easier and better to just go ahead and use the ODBC driver. Here's an example.

Just be sure to watch out for 32- vs. 64-bit drivers and the version of Perl you have installed as they must match.

This post also covered this topic a bit.

  • Comment on Re: Perl 5.20 Sybase 15.7 connect to database error

Replies are listed 'Best First'.
Re^2: Perl 5.20 Sybase 15.7 connect to database error
by cjhastings1 (Novice) on Aug 16, 2016 at 18:52 UTC
    I was able to use the DBI:ODBC route to connect to the database. I could not use the SybaseASE or the Sybase route as it was unable to find the modules. Below is my code snippet that succeeded:
    my $dbh = DBI->connect( "dbi:ODBC:$db", "$login", "$password", { RaiseError => 1, AutoCommit => 1 } ) || err("Database Error","Can't connect to database $d +b: ". "$DBI::errstr",3);

    Thank you both for your assistance with this matter.