2010-02-05 103 views

回答

7

添加到您的脚本的末尾:

if @Result = 'Error' 
    raiserror('The stored procedure returned an error',16,1) 

,并确保步骤属性的“高级”选项卡,在“失败动作”设置为“退出作业报告失败“

0

您可以使用尝试捕捉

Begin Try 
    exec myprocedure 
    @Result = @Result output 
End Try 

Begin Catch 
    /*Do whatever you want here*/ 
End Catch 
相关问题