Steffen,
Jan will have to dig back 5-6 years for that one! IIRC, at one
point the type Variant started returning an object or reference
instead of the value (as it had in previous versions).
It was necessary to obtain the value.
If you comment out the code, what happens?
Tom
On Mon, Jan 26, 2004 at 10:48:07AM +0100, Steffen Goeldner wrote:
>
> Hi Jan,
>
> the fetch method of DBD::ADO::st contains the following lines:
>
> my $row =
> [ map { $rs->Fields($_->{Name})->{Value} } @$ado_fields ];
> # Jan Dubois [EMAIL PROTECTED] addition to handle changes
> # in Win32::OLE return of Variant types of data.
> foreach (@$row) {
> $_ = $_->As( Win32::OLE::Variant::VT_BSTR() )
> if UNIVERSAL::isa($_, 'Win32::OLE::Variant');
> }
>
> where $rs is an ADO Recordset. Is the foreach loop really
> necessary, i.e. can a Field value be a Win32::OLE::Variant?
> I thought the Value method always returns a Perl value?
> What does the comment mean, i.e. what are these 'changes in
> Win32::OLE return of Variant types of data'?
>
>
> Steffen