Abort Script if Error Found?

JYoderJYoder Posts: 5
edited September 29, 2011 2:40PM in SQL Compare Previous Versions
When the generated SQL script encounters an error, it does a rollback and continues executing the script. Can it instead rollback and stop any following commands from executing via something like SET NOEXEC ON?

Comments

  • You can Do:

    SET NOEXEC OFF

    Then on Error:

    @TRANCOUNT>0 ROLLBACK SET NOEXEC ON END
    GO


    If first taught you had some other error management but after I review it, no magic... maybe you have a reason behind... If so, Pls share...
    Denis Gilbert
    Conseiller-Adjoint en TI,
    Développement de systèmes
    Morneau Shepell Ltée
  • Yes, that's if I did it myself. I'm asking if SQL Compare can generate it's output scripts in a similar fashion.
Sign In or Register to comment.