in reply to Using DBI to make connection to a database

Please, show the error messages, so we can do more than just guess.

Here's how we connect to a MS SQL Server at work:

my $db = 'DBI'->connect("DBI:ODBC:Driver={SQL Server};Server=$serv +er;Database=$database", $user, $secret, @options);

Have you installed DBD::ODBC?

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Using DBI to make connection to a database
by campbell (Beadle) on Jul 02, 2015 at 12:44 UTC
    OK - now updated (sorry - I wasn't sure if I may have been muddying the waters by including the error messages as it seemed a fairly clear-cut case of using the wrong syntax.)

      So, have you installed DBD::DriverName? Or maybe you need to adapt your DSN string to use dbi:ODBC if you are on Windows and want to use DBD::ODBC?