| Author |
Message |
screek
Joined: 01 Oct 2008 Posts: 3
|
Posted: Wed Oct 01, 2008 3:07 pm Post subject: 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 |
|
| Back to top |
|
 |
benhall
Joined: 14 Dec 2007 Posts: 98
|
Posted: Thu Oct 02, 2008 11:14 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
screek
Joined: 01 Oct 2008 Posts: 3
|
Posted: Thu Oct 02, 2008 11:27 am Post subject: |
|
|
Great, that works exactly as I wanted it to.
Thanks for your help. |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group