Posted by laurenq uantrell on 10/20/56 11:27
>Look at it this way: you have this handling in many stored procedures.
>Maybe you happen to forget to insert it in some place. And you have
>this handling in many places in your client code. Maybe you acceidently
>leave it in some place. So keep a double safeguard.
I'm not sure what you'rer suggesting...
I thought that this would clear up any error in the sproc:
SELECT @err = @@error IF @err <> 0 BEGIN ROLLBACK TRANSACTION RETURN
@err END
COMMIT TRANSACTION
SELECT @err = @@error IF @err <> 0 RETURN @err
Are you suggesting I put:
IF @@trancount > 0 ROLLBACK TRANSACTION
inthe sproc as well and not check for that in the front-end
application?
[Back to original message]
|