This is on 64bit Windows 7.
On Cygwin:
$ perl -Mblib -MData::Dumper -MWin32::OLE -le 'print Dumper(Win32::OLE-
>new("ADODB.Connection"))'
$VAR1 = undef;
On ActiveState Perl 32 bit:
$ perl -MData::Dumper -MWin32::OLE -le 'print Dumper(Win32::OLE->new
("ADODB.Connection"))'
$VAR1 = bless( {
'Properties' => bless( {
'Count' => 14,
'Item' => undef
}, 'Win32::OLE' ),
'ConnectionString' => 'Provider=MSDASQL.1',
'CommandTimeout' => 30,
'ConnectionTimeout' => 15,
'Version' => '6.1',
'Errors' => bless( {
'Count' => 0,
'Item' => undef
}, 'Win32::OLE' ),
'DefaultDatabase' => undef,
'IsolationLevel' => 4096,
'Attributes' => 0,
'CursorLocation' => 2,
'Mode' => 0,
'Provider' => 'MSDASQL.1',
'State' => 0
}, 'Win32::OLE' );
2011/1/23 Rafael Kitover via RT <bug-Wi...@rt.cpan.org>:
> This is on 64bit Windows 7.
>
> On Cygwin:
>
> $ perl -Mblib -MData::Dumper -MWin32::OLE -le 'print Dumper(Win32::OLE-
>>new("ADODB.Connection"))'
> $VAR1 = undef;
On 32-bit Windows XP also.
All tests pass, but:
$ perl -Mblib -MData::Dumper -MWin32::OLE -le 'print
Dumper(Win32::OLE->new("ADODB.Connection"))'
$VAR1 = undef;
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
> This is on 64bit Windows 7.
>
> On Cygwin:
>
> $ perl -Mblib -MData::Dumper -MWin32::OLE -le 'print Dumper(Win32::OLE-
> >new("ADODB.Connection"))'
> $VAR1 = undef;
Can you please run with warnings enabled? Win32::OLE will print
additional diagnostics on OLE calls when warnings are on.
> On ActiveState Perl 32 bit:
Is this just 32-bit ActivePerl on the same machine, or on a different
one?
Also, which Cygwin version are you using? Your example works fine
with my (obsolete) Cygwin 1.5 install.
>> This is on 64bit Windows 7.
>>
>> On Cygwin:
>>
>> $ perl -Mblib -MData::Dumper -MWin32::OLE -le 'print Dumper(Win32::OLE-
>> >new("ADODB.Connection"))'
>> $VAR1 = undef;
>
> Can you please run with warnings enabled? Win32::OLE will print
> additional diagnostics on OLE calls when warnings are on.
$ perl -MWin32::OLE -wle 'print Win32::OLE->new("ADODB.Connection")'
Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be
found" at -e line 1
eval {...} called at -e line 1
Use of uninitialized value in print at -e line 1.
With a debugging OLE lib and perl:
$ perl5.13.8d-nt -Mblib -we'use Win32::OLE;
Win32::OLE->new(q(ADODB.Connection))'
Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be
found" at -e line 1
eval {...} called at -e line 1
$ gdb perl5.13.8d-nt
(gdb) run -Mblib -we'use Win32::OLE; print Win32::OLE->new(q(ADODB.Connection))'
Starting program: /usr/local/bin/perl5.13.8d-nt -Mblib -we'use
Win32::OLE; print Win32::OLE->new(q(ADODB.Connection))'
[New thread 8308.0xa88]
[New thread 8308.0xb10]
[New thread 8308.0x2380]
[New thread 8308.0x1ccc]
[New thread 8308.0xd8c]
[New thread 8308.0x22d8]
[New thread 8308.0x125c]
Win32::OLE=HASH(0xb56348)
This needs now printf debugging, oh my.
>> On ActiveState Perl 32 bit:
>
> Is this just 32-bit ActivePerl on the same machine, or on a different
> one?
I crosschecked with strawberry on the same machine, where
ADODB.Connection is registered.
c:\strawberry> perl -MData::Dumper -MWin32::OLE -le "print
Dumper(Win32::OLE->new(q(ADODB.Connection)))"
$VAR1 = bless( {
'Properties' => bless( {
'Count' => 14,
'Item' => undef
}, 'Win32::OLE' ),
'ConnectionString' => 'Provider=MSDASQL.1',
'CommandTimeout' => 30,
'ConnectionTimeout' => 15,
'Version' => '6.1',
'Errors' => bless( {
'Count' => 0,
'Item' => undef
}, 'Win32::OLE' ),
'DefaultDatabase' => undef,
'IsolationLevel' => 4096,
'Attributes' => 0,
'CursorLocation' => 2,
'Mode' => 0,
'Provider' => 'MSDASQL.1',
'State' => 0
}, 'Win32::OLE' );
> Also, which Cygwin version are you using? Your example works fine
> with my (obsolete) Cygwin 1.5 install.
Latest 1.7.8 with my official perl
On Mon, 24 Jan 2011, Reini Urban via RT wrote:
> > Can you please run with warnings enabled? Win32::OLE will print
> > additional diagnostics on OLE calls when warnings are on.
>
> $ perl -MWin32::OLE -wle 'print Win32::OLE->new("ADODB.Connection")'
> Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be
> found" at -e line 1
> eval {...} called at -e line 1
> Use of uninitialized value in print at -e line 1.
[...]
> > Is this just 32-bit ActivePerl on the same machine, or on a different
> > one?
>
> I crosschecked with strawberry on the same machine, where
> ADODB.Connection is registered.
> c:\strawberry> perl -MData::Dumper -MWin32::OLE -le "print
> Dumper(Win32::OLE->new(q(ADODB.Connection)))"
> $VAR1 = bless( {
> 'Properties' => bless( {
[...]
Could you try running Cygwin Perl from cmd.exe instead of bash? I've
found several references with Google that certain COM components (WMI,
ADODB) cannot be instantiated when the program is started from bash,
but work fine when started from cmd.exe.
If that is the case, start looking into differences in those environments,
especially settings of PATH and maybe COMSPEC, and try to copy setting
from cmd.exe to bash until it starts working.
Cheers,
-Jan
On 1/24/2011 3:59 PM, ja...@ActiveState.com via RT wrote:
> <URL: https://rt.cpan.org/Ticket/Display.html?id=65052>
>
> On Mon, 24 Jan 2011, Reini Urban via RT wrote:
>>> Can you please run with warnings enabled? Win32::OLE will print
>>> additional diagnostics on OLE calls when warnings are on.
>>
>> $ perl -MWin32::OLE -wle 'print Win32::OLE->new("ADODB.Connection")'
>> Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be
>> found" at -e line 1
>> eval {...} called at -e line 1
>> Use of uninitialized value in print at -e line 1.
>
> [...]
>
>>> Is this just 32-bit ActivePerl on the same machine, or on a different
>>> one?
>>
>> I crosschecked with strawberry on the same machine, where
>> ADODB.Connection is registered.
>> c:\strawberry> perl -MData::Dumper -MWin32::OLE -le "print
>> Dumper(Win32::OLE->new(q(ADODB.Connection)))"
>> $VAR1 = bless( {
>> 'Properties' => bless( {
>
> [...]
>
> Could you try running Cygwin Perl from cmd.exe instead of bash? I've
> found several references with Google that certain COM components (WMI,
> ADODB) cannot be instantiated when the program is started from bash,
> but work fine when started from cmd.exe.
>
> If that is the case, start looking into differences in those environments,
> especially settings of PATH and maybe COMSPEC, and try to copy setting
> from cmd.exe to bash until it starts working.
>
> Cheers,
> -Jan
That is indeed the case.
There are a whole bunch of warnings, but the object is returned:
c:\users\rkitover>\cygwin\bin\perl -MWin32::OLE -MData::Dumper -wle
"print Dumper(Win32::OLE->new('ADODB.Connection'))"
Win32::OLE(0.1709) error 0x8002000e: "Invalid number of parameters"
in METHOD/PROPERTYGET "Item" at
/usr/lib/perl5/5.10/i686-cygwin/Data/Dumper.pm line 190
Win32::OLE(0.1709) error 0x8002000e: "Invalid number of parameters"
in METHOD/PROPERTYGET "Item" at
/usr/lib/perl5/5.10/i686-cygwin/Data/Dumper.pm line 190
OLE exception from "ADODB.Connection":
Operation is not allowed when the object is closed.
Win32::OLE(0.1709) error 0x80020009: "Exception occurred"
in METHOD/PROPERTYGET "DefaultDatabase" at
/usr/lib/perl5/5.10/i686-cygwin/Data/Dumper.pm line 190
$VAR1 = bless( {
'Properties' => bless( {
On Mon, 24 Jan 2011, rkit...@cpan.org via RT wrote:
> On 1/24/2011 3:59 PM, ja...@ActiveState.com via RT wrote:
> > Could you try running Cygwin Perl from cmd.exe instead of bash? I've
> > found several references with Google that certain COM components (WMI,
> > ADODB) cannot be instantiated when the program is started from bash,
> > but work fine when started from cmd.exe.
[...]
> That is indeed the case.
>
> There are a whole bunch of warnings, but the object is returned:
Those warnings are normal. Dumping the whole connection object will
try to fetch several properties that aren't initialized in the closed
state of the object. You get the same warnings with regular Perl.
I'm going to close this bug, as it seems to be neither an issue with
Perl nor with Win32::OLE but just with the way the Cygwin bash shell
sets up the environment, and therefore should be fixed there.
Cheers,
-Jan
On 32-bit Windows XP also.
All tests pass, but:
$ perl -Mblib -MData::Dumper -MWin32::OLE -le 'print
Dumper(Win32::OLE->new("ADODB.Connection"))'
$VAR1 = undef;
--
$ perl -MWin32::OLE -wle 'print Win32::OLE->new("ADODB.Connection")'
Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be
found" at -e line 1
eval {...} called at -e line 1
Use of uninitialized value in print at -e line 1.
With a debugging OLE lib and perl:
$ perl5.13.8d-nt -Mblib -we'use Win32::OLE;
Win32::OLE->new(q(ADODB.Connection))'
Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be
found" at -e line 1
eval {...} called at -e line 1
$ gdb perl5.13.8d-nt
(gdb) run -Mblib -we'use Win32::OLE; print Win32::OLE->new(q(ADODB.Connection))'
Starting program: /usr/local/bin/perl5.13.8d-nt -Mblib -we'use
Win32::OLE; print Win32::OLE->new(q(ADODB.Connection))'
[New thread 8308.0xa88]
[New thread 8308.0xb10]
[New thread 8308.0x2380]
[New thread 8308.0x1ccc]
[New thread 8308.0xd8c]
[New thread 8308.0x22d8]
[New thread 8308.0x125c]
Win32::OLE=HASH(0xb56348)
This needs now printf debugging, oh my.
>> On ActiveState Perl 32 bit:
>
> Is this just 32-bit ActivePerl on the same machine, or on a different
> one?
I crosschecked with strawberry on the same machine, where
ADODB.Connection is registered.
c:\strawberry> perl -MData::Dumper -MWin32::OLE -le "print
Dumper(Win32::OLE->new(q(ADODB.Connection)))"
$VAR1 = bless( {
'Properties' => bless( {
'Count' => 14,
'Item' => undef
}, 'Win32::OLE' ),
'ConnectionString' => 'Provider=MSDASQL.1',
'CommandTimeout' => 30,
'ConnectionTimeout' => 15,
'Version' => '6.1',
'Errors' => bless( {
'Count' => 0,
'Item' => undef
}, 'Win32::OLE' ),
'DefaultDatabase' => undef,
'IsolationLevel' => 4096,
'Attributes' => 0,
'CursorLocation' => 2,
'Mode' => 0,
'Provider' => 'MSDASQL.1',
'State' => 0
}, 'Win32::OLE' );
> Also, which Cygwin version are you using? Your example works fine
> with my (obsolete) Cygwin 1.5 install.
Latest 1.7.8 with my official perl