in reply to Re: Connection Problem to MS Access Database using DBI
in thread Connection Problem to MS Access Database using DBI
or$dsn = "DBI:ODBC:PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.m +db)};DBQ=" . $db_name;
The connect Perl row was$dsn = "DBI:ADO:PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.md +b)};DBQ=" . $db_name;
I did try one of the dsn defintions suggest (it is below) there are some small differences however I got exaclty the same error messages.DBI->connect($dsn, "", "") or ($dbh_ok = 'no');
I am not sure which worked but I think one of them did since the Perl writes the meta data for the database and there is a file of this as well. When I use the code now I get the following error messages for the ODBC version - I could not use the ADO since ADO was no longer there. DBI connect('PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=FULL PATH TO Access Databse\StockH.mdb','',...) failed: MicrosoftODBC Driver Manager Data source name not found and no default driver specified (SQL-IM002) Therefore it looks like Access 2010 needs something different to what was successful for a previous version of Access. Can anyone tell me what I should be using for this?$dsn = 'dbi:ODBC:Driver={Microsoft Access Driver (*.mdb, )};DBQ=' . $d +b_name;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Connection Problem to MS Access Database using DBI
by poj (Abbot) on May 17, 2019 at 13:25 UTC |