Re: DB2 Err Handling

2005-09-20 Thread Dan Scott
Tim Bunce wrote: On Fri, Sep 02, 2005 at 05:37:57PM -0500, johnn wrote: Capacio, Paula J wrote: my $stmt = 'select count(*) from sysibm.badTblnm '; my $sth = $dbh-prepare($stmt) or die Prepare Failed\n; DBD::DB2 doesn't seem to return false values for failures. If that's true then

Re: DB2 Err Handling

2005-09-03 Thread Tim Bunce
On Fri, Sep 02, 2005 at 05:37:57PM -0500, johnn wrote: Capacio, Paula J wrote: my $stmt = 'select count(*) from sysibm.badTblnm '; my $sth = $dbh-prepare($stmt) or die Prepare Failed\n; DBD::DB2 doesn't seem to return false values for failures. If that's true then it's broken. It may

Re: DB2 Err Handling

2005-09-02 Thread aroushdi
Paula J Capacio wrote: Hello, I have successfully executed SQL statements to a DB2 database from perl 5.8.2 using DBI V1.48 and DBD::DB2 V0.78 on AIX 5.2.2.0. I'm now testing the error handling, and it is not working as I expect. For instance I try to prepare a statement I know will fail but

Re: DB2 Err Handling

2005-09-02 Thread johnnnnnn
Capacio, Paula J wrote: my $stmt = 'select count(*) from sysibm.badTblnm '; my $sth = $dbh-prepare($stmt) or die Prepare Failed\n; DBD::DB2 doesn't seem to return false values for failures. Instead, try checking the sqlstate of the db handle: my $sth = $dbh-prepare($stmt); if

DB2 Err Handling

2005-08-31 Thread Capacio, Paula J
Hello, I have successfully executed SQL statements to a DB2 database from perl 5.8.2 using DBI V1.48 and DBD::DB2 V0.78 on AIX 5.2.2.0. I'm now testing the error handling, and it is not working as I expect. For instance I try to prepare a statement I know will fail but error handling using 'or'