Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: MS Access database problem

by tachyon-II (Chaplain)
on Nov 30, 2007 at 02:57 UTC ( [id://654032]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://654032]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2026-04-19 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.