in reply to MS Access database problem

You can't connect to an access database simply by specifying the filename of the database file "testdb.mdb". You need to register it as a datasource and then you connect to the registerd name. See this tutorial for the details about how to register it with the ODBC controller or just do Start|Run|odbcad32.exe. In the widget select driver for *.mdb, add/configure giving your DB a name and selecting the path to your mdb file. You connect to the name you just assigned, rather than the blah.mdb file per se.

cheers

tachyon

Replies are listed 'Best First'.
Re^2: MS Access database problem
by vdubjunkie (Novice) on Nov 30, 2007 at 13:28 UTC
    I am ASTOUNDED

    to learn that EVERY page I found led me to believe you could simply access it by the filename. Believe it or not, I searched high and low prior to posting here, and I never saw a page even reference HOW to open a MS Access database by it's DSN rather than it's name...

    Needless to say..

    That worked!!

    A huge thank you

    ..oh, and no, the space before (*.mdb) didn't matter as doesn't capitalization on DBI, etc.. for those searching these forums later.

      Actually having just read the pod for DBD::ODBC they have introduced direct access to mdb files since last I looked (6 years ago more or less :-). I think your original code would have worked if you had specified the full path to the testdb.mdb file. See DBD-ODBC/ODBC.pm#Connect_without_DSN

      Anyway glad you got it working. As noted in the DBD::ODBC pod if you use the DSN method that worked for you then you need to make it a system DSN, not a user DSN.