Thomas, I've had a problem with DBD::ADO for the last few releases but
haven't had time to report it.

When I "use warnings;" I often get OLE warnings when executing a prepared
statement.  I have tested this against a number of datasources.  I have
attached the code after my signature.


Against a Microsoft Access datasource I get a few of:

Provider cannot derive parameter information and SetParameterInfo has not
been called.

Win32::OLE(0.1502) error 0x80020009: "Exception occurred"
    in METHOD/PROPERTYGET "Count" at C:/Perl/site/lib/DBD/ADO.pm line 1878


Against an MS SQL Server (6.5) I get many of:

Object or provider is not capable of performing requested operation.

Win32::OLE(0.1502) error 0x800a0cb3
    in METHOD/PROPERTYGET "OpenSchema" at C:/Perl/site/lib/DBD/ADO.pm line
1400


I have this problem with the ODBC provider with both Access and SQL Server.  
I have this problem with the SQLOLDB provider for MS SQL Server.
I don't have this problem with the Jet provider with Access.
I don't have this problem with the ODBC provider and Sybase ASA 8.
I don't have this problem with the ASAProv provider and Sybase ASA 8.

--
  Simon Oliver

#!/usr/bin/perl
use DBI;
use strict;
use warnings;
my ($dbf, $dsn, $uid, $pwd, $dbh, $sth);

#$dbf = 'C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb';
#$dsn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=$dbf;";
#$dsn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=$dbf;";
#$dsn = qq{PROVIDER=SQLOLEDB;DATABASE=Northwind;SERVER=.};
$dsn = "Northwind";
#$uid = '';
#$pwd = '';

$dbh = DBI->connect("dbi:ADO:$dsn", $uid, $pwd, {RaiseError => 1});
$sth = $dbh->prepare(q{select * from products});
$sth->execute;
$sth->dump_results;
$dbh->disconnect();

Reply via email to