MS ACCESS DATABASE CONNECTION: Can't locate loadable object for module Win32::OLE

Hi ActiveState Community,

I have a question about a simple connection script, which worked on WINDOW 7 flawlessly:

__________________SCRIPT START

#!/usr/bin/perl -w

use strict;

print “test connection\n\n”;

use Win32::OLE;
use Win32::OLE::Variant;
use Win32::OLE::Const (“Microsoft ActiveX Data Objects 2”);


$db_connstr=“Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\_DATABASE\INDEX\INDEX_A_m_x.mdb”;

$conn = Win32::OLE->new(“ADODB.Connection”);
$conn->Open($db_connstr, $db_uid, $db_pw);

__________________SCRIPT END

On my new OS Windows 10, I get following message:

$ perl
Can’t locate loadable object for module Win32::OLE in @INC
(@INC contains: C:/Perl64/site/lib C:/Perl64/lib) at line 11.
Compilation failed in require at line 11.
BEGIN failed–compilation aborted at line 11.

How can I resolve this error?

Thank you for your help.


I have the same issues with my scripts which requires modules outside of base ActiveState Perl, it just means that it cannot find the modules needed for the script to run because it was not implemented in your environment even though on the site it says that it is installed successfully. I have not tried it, but my guess is if you can download the module, you could copy it into the folder that its trying to access the module and it should work.

Thank you paofue,

I did find what I needed here:

and right now all is working perfectly.