Stored Procedure Error Traps

Stored Procedure Error Traps

Post by Carol Davi » Sun, 31 Dec 1899 09:00:00

> I am looking for some example of stored procedure error traps.

> Thanks.

We trap all errors returned by the database server via an on execption
and then propagate the error ba k to the caller.   The exception handler
is very simple in this case:

--- Error handler
   on exception set sqlstat, sqlisam, sqltext
                return sqlstat, sqlisam, sqltext, procname;
   end exception;

You can, of course, take any kind of corrective action you want within
the exception handler.
Carol Davies


1. DTS with stored procedures / error trapping

I have a stored procedure -- which calls others -- that reads a staging
table using a cursor, and then inserts/updates 4 other production

When I run the procedure from SQL server, it works fine.

When I run it from DTS, it stops for no apparent reason, after
inserting only a few rows, reporting successful completion.

I have discovered that if I comment out procedures that I know are
producing execution-time errors, it will run longer with more rows
being inserted.  However, it is important for me to leave the execution
errors in and trap them myself.  The weird thing is that the option to
fail on the first error is not checked.  I have not been able to
determine whether it bombs after a specific number of errors, or
whether it bombs on the first error with sufficient severity.

Anyone run into this?  How do I get it to keep going?

Yabba Dabba Doo

Sent via
Before you buy.

2. What is Semantic Database Prototyping?

3. Stored Procedure error trap

4. How to establish connection between Data Analyzer and Analysis Service Server?

5. Stored procedure error trapping from ASP

6. dirty read

7. DTS with stored procedures / error trapping

8. ===> TRAINING <===

9. Stored Procedure error trapping advice

10. Trap Entended stored procedure errors in DBLIB

11. Trapping Errors Raised Within Stored Procedures

12. trapping errors in stored procedures (newbie)