BEGIN TRY
BEGIN TRANSACTION
--Update or Insert
statements
COMMIT TRANSACTION
END TRY
BEGIN CATCH
select ERROR_NUMBER() as ErrorNumber, ERROR_LINE() as ErrorLine, ERROR_MESSAGE() as ErrorMessage
BEGIN
ROLLBACK TRANSACTION
END
END CATCH
No comments:
Post a Comment
Comments will appear once they have been approved by the moderator