This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Perl Win32::OLE ADODB.Connection fails on Vista


I have been using the Cygwin Perl Win32::OLE module as a nice way to query
Access databases [*]. This worked fine on Windows XP (32-bit), but no longer
works on a new Vista (64-bit) machine. The initial connection

  $conn= Win32::OLE->new ('ADODB.Connection')

fails with

  Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be

Connecting to some other OLE applications (eg. Excel.Application) works OK.
The same ADODB script works fine from ActiveState Perl (at least for the
32-bit version; there is no 64-bit version of the Microsoft Access Driver,
so ActiveState Perl x64 fails at the next step). However I'd prefer to use
Cygwin Perl.

I upgraded Cygwin's Win32::OLE to the latest version (perl-5.10.0-5 comes
with Win32::OLE 0.1703, while the latest ActiveState Perl has Win32::OLE
0.1709), but that didn't help.

Does anyone have any ideas?


[*] eg. the following will read all values from $field in $table of $file
(this example can be modified with an arbitrary SQL query).

  use Win32::OLE;
  Win32::OLE->Option (Warn => 3);
  my $conn= Win32::OLE->new ('ADODB.Connection') or die;
  $conn->Open ("PROVIDER=MSDASQL;".
               "DRIVER={Microsoft Access Driver (*.mdb)};".
  my $rs= Win32::OLE->new ('ADODB.Recordset') or die;
  $rs->Open ("SELECT $field FROM $table", $conn, 1, 1);
  until ($rs->EOF) {
    print $rs->Fields ($field)->value, "\n";

===========================  cut here  ============================
 Tim Adye
 Atlas/BaBar Groups, Particle Physics Dept, Rutherford Appleton Lab

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]