No error trapping with DBD::ADO and selectrow_array
From: Tom (ziggy.971485_at_bloglines.com)
Date: 04/02/04
- Next message: tomg_at_sqlclinic.net: "Re: Accessing bound params?"
- Previous message: Dennis M. Gray: "RE: Installing dbish causing problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 2 Apr 2004 05:38:42 -0800
I'm using perl 5.8 with DBI 1.37, DBD::ADO 2.90, and Win32::OLE .17
with a SQL Server 2000 database.
I've noticed when using the selectrow_array or selectall_arrayref
functions that database errors are not detected. For example:
********************
use DBI;
$dbh = DBI->connect( "dbi:ADO:Provider=SQLOLEDB.1;Persist Security
Info=False;Initial Catalog=master;Data Source=localhost;Integrated
Security=SSPI",
undef, undef,
{PrintError => 1,RaiseError => 1,AutoCommit => 1});
@row=$dbh->selectrow_array("select * from nonexistant_table");
print "err=",$dbh->err,"\n";
$dbh->disconnect;
********************
$dbh->err is empty and no error is generated via PrintError=>1 either.
If I use prepare and execute, I get the expected error. Is there a
problem with these functions in DBD::ADO or do I need to change
something in my code?
Thanks,
Tom
- Next message: tomg_at_sqlclinic.net: "Re: Accessing bound params?"
- Previous message: Dennis M. Gray: "RE: Installing dbish causing problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|