I assume that the driver does not match what you had for the DSN, or something else that causes problems if you mix 64-bit Perl with a 32-bit ODBC driver or 32-bit Perl with a 64-bit driver. The real problem is that the error message is terribly vague - you think maybe they could tell you if the data source or driver was the problem? In an ideal world ...
In any case, this method that you tried to do works if your DSN is correct, and if your Perl and ODBC driver are in the same bit family.
The link to the driver in DSN should exactly match what is specified in the Installation Tools > Data Sources (ODBC) > Drivers section. Mine is listed as a Microsoft Access Driver (.mdb, .accdb), so itโs a bit different than what you had. In Perl, the connection string is:
my $dbh = DBI->connect('dbi:ODBC:driver=Microsoft Access Driver (*.mdb, *.accdb);dbq=X:\Path\To\Your\Database.mdb')
Additional information about MS Access with Perl in Windows 7 is here .
source share