Here's a test that can help identify what connection settings to use:

Create a working system DSN.

Then connect to the DSN using ADO and examine the Connection String:

use warnings;
use strict;
use DBI;

my ($dsn, $uid, $pwd) = @ARGV;

my ($p) = $0 =~ m/[\\\/]?([^\\\/]+$)/;

if (!defined $dsn || $dsn =~ /^-h/) {
        die "Usage: $p dsn [uid] [pwd]\n",
                "\t'dsn' can be a DSN or connection string.\n";
}

my $dbh = DBI->connect("dbi:ADO:$dsn", $uid, $pwd) 
  or die "Error connecting to '$dsn' as '$uid'.\n";

print $dbh->{ConnectionString};

exit;

Reply via email to