I get try this on a Windows 7Pro 64-bit and with 64bit office
with the odbc driver enabled in php.ini
and get
Not sure what "Data source name "means
I checked on the web
I'm not sure what the issue is here (never used access before) and the only thing I found was to uninstall Office and install an executable. Not sure whether I need to reinstall afterwards.
Also, Administrative Tools->ODBC only knows SQL Server as additional driver; I doubt this is what is needed here.
Code:
try{ $link = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=c:/wamp/www/myproject/test.accdb");
and get
SQLSTATE[IM002] SQLConnect: 0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Not sure what "Data source name "means
I checked on the web
here are actually two separate Microsoft ODBC Administrator apps, one for 32-bit and one for 64.
As this KB article explains:
The 32-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\SysWoW64 folder.
The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\System32 folder.
Nope, not a typo -- the 32-bit version is in the SysWoW64 folder and the 64-bit is in the System32 folder. ()
I was running a 64-bit web server which was checking the 64-bit ODBC library for the DSN, whereas I had it in the 32-bit. Downgrading the server did the trick.
I'm not sure what the issue is here (never used access before) and the only thing I found was to uninstall Office and install an executable. Not sure whether I need to reinstall afterwards.
Also, Administrative Tools->ODBC only knows SQL Server as additional driver; I doubt this is what is needed here.