Options

Raising errors in pre-scripts to abort the generation proces

screekscreek Posts: 5
Hi,

Is it possible to raise errors in the pre-scripts that will abort the generation process?

I've tried using RAISERROR but the text is just printed in the generation report.

Thanks,

Steve

Comments

  • Options
    Hi Steve,

    It all depends on the severify level of your error. If you raise your between between 11 and 16 then we will stop generation. Any errors below are just information, as such we output the error but continue.

    You can find out more information on MSDN - http://msdn.microsoft.com/en-us/library/aa937483(SQL.80).aspx


    For example, this will stop generation:
    RAISERROR('Stop Generation',12,1)

    Where as, this will just output a message:
    RAISERROR('This is just some information',1,1)

    I hope this helps.

    Thanks

    Ben
  • Options
    Great, that works exactly as I wanted it to.

    Thanks for your help.
Sign In or Register to comment.