Thursday, June 27, 2013

Skipping procedure

Hi Thomas,


Just put the call for each sub procedure in TRY...CATCH Block. In catch block you can capture the error and move the execution to next execution statment.


For example:



create procedure proc
as
begin
----Call first proc----
begin try
EXEC Proc1 -- First proc Call
end try

begin catch
-- Do error handling
end catch

----Call second proc----
begin try
EXEC Proc2 -- Second proc Call
end try

begin catch
-- Do error handling
end catch
end







Regards Harsh



No comments:

Post a Comment