Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Now ... my perl will not pick up this user defined error !! It sees the first command executed succesfully then ignores subsequent errors.CREATE PROC SP_DAVE AS BEGIN update mytable set st = getdate() where date = getdate(); if @@rowcount != 1 begin RAISERROR ('No Rows !!',16,1); RETURN -1; end RETURN 0; END;
...$sql = "EXEC SP_DAVE"; $sth = $dbh->prepare($sql); $sth->execute or print "\nError EXECUTE\n$DBI::errstr\n";
Edit by castaway - added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trapping Stroed Proc errors with MSSQL
by gellyfish (Monsignor) on Jul 22, 2004 at 11:03 UTC | |
by Anonymous Monk on Jul 22, 2004 at 12:49 UTC | |
|
Re: Trapping Stroed Proc errors with MSSQL
by mpeppler (Vicar) on Jul 22, 2004 at 17:48 UTC | |
|
Re: Trapping Stroed Proc errors with MSSQL
by EdwardG (Vicar) on Jul 23, 2004 at 08:02 UTC | |
by Anonymous Monk on Jul 23, 2004 at 08:45 UTC |