mecrazycoder has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: MSSQL- Can't proceed further
by marto (Cardinal) on Sep 28, 2009 at 13:04 UTC

    Did you read the DBI::FAQ I mentioned earlier? Have you created a DSN for the database you are trying to use (in your example XYZ)? Read DBD::ODBC::FAQ and README.windows.

    Try

    my $dbh = DBI->connect("dbi:ODBC:$dsn", $user, $password) or die "DBI connect failed: $DBI::errstr\n";

    Martin

Re: MSSQL- Can't proceed further
by Corion (Patriarch) on Sep 28, 2009 at 13:05 UTC

    Maybe read the documentation for the ->connect method of DBI. It says:

    The $data_source value must begin with "dbi:driver_name:". The driver_name specifies the driver that will be used to make the connection. (Letter case is significant.)

    Your $dsn is initialized to XYZ, which sure does not start with dbi:. Maybe you want to retry with dbi:ODBC:XYZ or something like that.