How can we help you today? How can we help you today?

Raising errors in pre-scripts to abort the generation proces

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
screek
0

Comments

2 comments

  • benhall
    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
    benhall
    0
  • screek
    Great, that works exactly as I wanted it to.

    Thanks for your help.
    screek
    0

Add comment

Please sign in to leave a comment.