>DECLARE @err int > >UPDATE cart SET ..... > >SET @err = @@ERROR >IF @err != 0 GOTO __cleanup > >UPDATE nextTable SET ... > >SET @err = @@ERROR >IF @err != 0 GOTO __cleanup > >__cleanup: >IF @err != 0 >BEGIN > -- cleanup code goes here >END >>
declare @tnCartID int, @RetStat int EXECUTE @RetStat = USP_Insert_ShoppingCartInfo '11111111111' , 5 , 'Test' , 'B' , 'Test selection' , '1,2,3' , @tnCartID OUTPUT print @tnCartIDAll I see is 1 row affected, 1 row affected.