Board index » delphi » Error Handling in Stored Procedures
Patrick Moloney
![]() Delphi Developer |
Error Handling in Stored Procedures2007-03-17 07:50:56 AM delphi187 Does anyone know how to trap exceptions in a stored procedure? I want to process a bunch of records and not stop because one record fails. Most of the documentation talks about processing by SqlCode. I'm trying to handle my own exceptions. In particular, how can I get the message that would otherwise be displayed. I want to put it in a variable so I can store it someplace. Also, is it necessary to code for each exception that I want to trap? That's how I read the documentation, such that it is. While I may know the exceptions most directly related to the process I am working on, for a complex system, a lot of unexpected exceptions could pop up. And having to fix up this code down the road when somebody creates another exception would be impossible. -- Patrick Moloney |