On Wed, 10 May 2000 10:49:23 -0400, "Lowery, Thomas"
<[EMAIL PROTECTED]> wrote:
>> Or do you think this incompatibility is so severe that it
>> should be rolled
>> back?
>
>Maybe or maybe my understanding how to use these features needs expanding.
I currently intend to leave this in unless convinced otherwise.
>Previously I used this statement to return a row of data (DBD::ADO sub
>fetchrow_array).
>my $row = [ map { $rs->Fields($_->{Name})->{Value} } @$ado_fields ];
Oh, I see. The values might be used in a context that knows nothing about
OLE at all and therefore wants *everything* as either a number or a
string. I would think the following code would do the trick and shouldn't
be much slower also:
my $row = [ map { $rs->Fields($_->{Name})->{Value} } @$ado_fields ];
foreach (@$row) {
$_ = $_->As(VT_BSTR) if UNIVERSAL::isa($_, 'Win32::OLE::Variant');
}
Could you benchmark this and report if the effect is noticeable?
The advantage of the code above is that it is both backward and forward
compatible (should we ever decide to return more Variant types as objects;
VT_DECIMAL comes to mind here).
-Jan
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]