merrymonk has asked for the wisdom of the Perl Monks concerning the following question:
With the 64 bit Perl I got the following. >access_connect_pm.pz DBI connect('driver=Microsoft Access Driver (*.mdb, *.accdb);dbq=c:/temp/Database.accdb','',...) failed: MicrosoftODBC Driver Manager Data source name not found and no default driver specified (SQL-IM002) at c:\temp\access_connect_pm.pz line 6. Access DBI connection failed – error,/br> MicrosoftODBC Driver Manager Data source name not found and no default driver specified (SQL-IM002) With the 32 bit Perl I got the following. access_connect_pm.phz Access DBI connection made - handle <DBI::db=HASH(0x2fbb8fc)> So it does seem that it does matter whether a 32 bit or 64 bit Perl is used. I guess there probably is a means of using a 64 bit version of Perl to make a connection to Access 10 but I do not know where to start to find out.use strict; use DBI; my $dbfile = "c:/temp/Database.accdb"; my $dbh_ok = 'yes'; my $dsn = 'driver=Microsoft Access Driver (*.mdb, *.accdb);dbq='.$dbfi +le; my $dbh = DBI->connect("dbi:ODBC:$dsn", '', '') or ($dbh_ok = 'no'); if($dbh_ok eq 'no') { print "Access DBI connection failed - error\n$DBI::errstr\n"; } else { print "Access DBI connection made - handle <$dbh>\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Update: Using Perl to connect to an Access 10 database
by stevieb (Canon) on May 30, 2019 at 20:56 UTC | |
by pryrt (Abbot) on May 30, 2019 at 21:49 UTC | |
by stevieb (Canon) on May 30, 2019 at 22:15 UTC | |
by merrymonk (Hermit) on May 31, 2019 at 08:29 UTC | |
by poj (Abbot) on May 31, 2019 at 10:15 UTC | |
| |
|
Re: Update: Using Perl to connect to an Access 10 database
by holli (Abbot) on May 30, 2019 at 21:48 UTC |