Raising errors in pre-scripts to abort the generation proces

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

Raising errors in pre-scripts to abort the generation proces

Postby screek » Wed Oct 01, 2008 3:07 pm

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
 
Posts: 3
Joined: Wed Oct 01, 2008 2:34 pm

Postby benhall » Thu Oct 02, 2008 11:14 am

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
 
Posts: 69
Joined: Fri Dec 14, 2007 11:15 am

Postby screek » Thu Oct 02, 2008 11:27 am

Great, that works exactly as I wanted it to.

Thanks for your help.
screek
 
Posts: 3
Joined: Wed Oct 01, 2008 2:34 pm


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests