Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: Update: Using Perl to connect to an Access 10 database

by merrymonk (Hermit)
on May 31, 2019 at 08:29 UTC ( [id://11100768]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Update: Using Perl to connect to an Access 10 database
in thread Update: Using Perl to connect to an Access 10 database

Thank you for your comments.
This is an area I have never been to before so I am having trouble understanding the implications of what you have said. For example "you have to create your DSN in two locations:" sadly means nothing to me but I guess something may need to be done to the line
my $dsn = 'driver=Microsoft Access Driver (*.mdb, *.accdb);dbq='.$dbfi +le;

I have found that I do have odbccad32.exe and odbc32.dll in both the SysWOW64 and System32 directories. I am using Windows 10 OS.
I get the impression that I may have to do something so that the correct odbccad32.exe is used?
Is that correct and if so can you point me to some web page that has more 'clues'?

Replies are listed 'Best First'.
Re^5: Update: Using Perl to connect to an Access 10 database
by poj (Abbot) on May 31, 2019 at 10:15 UTC

    When you installed Access did you choose 64-bit or 32-bit version ?

    Open Access and use File->Help to see under About Microsoft Access (on right)

    Mine shows Version 14.0.7232.5000 (32-bit)

    Udpdate : to check which drivers you have use

    Control Panel -> System and Security -> Administrative Tools

    Then select ODBC Data Sources (32-bit) or ODBC Data Sources (64-bit). Select Drivers tab.

    poj
      I have exactly the same data for the Version of Access.

      Following your 'path', the Drivers tab says the File is ODBCJT32.DLL.
      Does this mean that I can only use a 32 bit Perl to connect to the current version of Access or is there some way of using a 64 bit Perl with this Access?

      As an alternate, is it likely that if I re-install Access as 64 bit I then can use the 64 bit Perl? If I do this do I also have to re-install other parts of Office 10 so that all are 64 bit?

        I wasn't very clear in my first post here. You don't have to re-install anything here. What I meant originally was:

        • run the %systemdrive%\Windows\SysWoW64\odbcad32.exe command, and set up your DSN
        • run the %systemdrive%\Windows\System32\odbcad32.exe command, and set up your DSN, *again*

        Each of those corresponds with each platform. The first is the ODBC manager program for 32-bit, and the latter is for 64-bit. The DSNs for each version are stored separately (at least the system DSNs are, but I digress). After you've got your DSNs set up for both platforms, everything should just work.

        if I re-install Access as 64 bit I then can use the 64 bit Perl

        Maybe, but I don't think the 64 bit ODBC driver is on the install disk so you need to download it. See 64bit v 32bit and be aware that "Compiled Access databases, like .MDE and .ACCDE files, won’t work unless they are specifically written for the 64-bit version of Office." and all the other caveats under "Reasons to choose the 32-bit version"

        do I also have to re-install other parts of Office 10 so that all are 64 bit?

        Yes, that is how I read it

        poj

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-03-28 21:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found