While doing error handling in Stored Proc, do I need to put error handling code after each UPDATE statement in the procedure using @@ERROR variable.e.g. Do i need to do like this for every update???UPDATE tblClearingChargeSET Calculated_ClrChrg = Calculated_ClrChrg + OrderSystem_Markup, Adj_ClrChrg = OrderSystem_MarkupWHERE Order_System = '1' AND ISNULL(ClrChrg_Id, 0) <> -1IF @@ERROR <> 0 BEGIN SET @strErrorCode = 'PRCC607' SET @strErrRemarks = 'usp_CLGCHG_CalcClearingCharge;12;@strValue='+ @strValue +',@strValueType=' + @strValueType EXEC usp_COMM_LogError @strErrorCode = @strErrorCode, @strRemarks = @strErrRemarks, @chrUpdateCommTranStatusToError = 'N' RETURN(1)END
- Anand