Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

cdn.s3techtraining.com
from cdn.s3techtraining.com More from this publisher
17.06.2013 Views

Chapter 18: Getting Integrated with Integration Services Figure 18-16 Cancel out of all the dialogs to leave things as they were when we completed the wizard. Event Handlers 556 Moving over to the Event Handlers tab, we can see the many events that we can supply code for. Activate the drop-down (as I have in Figure 18-17). While the default is OnError, we can deal with a very wide range of scenarios. Let’s examine how a few of these might be used: ❑ OnError: Well, I would hope that this is the most obvious one. As you would expect, this event is fired in the event an error is detected. It allows you to address the error in some fashion. ❑ OnWarning: Basically the same as OnError, but it allows you to examine and possibly address warnings too. ❑ OnProgress: For long running processes, this can be handy for updating some form of progress indicator (perhaps a status table somewhere). ❑ OnPreExecute: Allows for things like preparation code to run prior to starting the main part of the task. And this is, of course, just a taste. What events to use will vary by need.

Figure 18-17 Package Explorer This is, again, one of those things that is what it sounds like. Much like Windows Explorer is a way to explore your file system in a folder-based paradigm, the Package Explorer allows you to explore the package in a similar paradigm. In Figure 18-18, I’ve expanded a few of the folders to give you a feel. Figure 18-18 Chapter 18: Getting Integrated with Integration Services 557

Chapter 18: Getting Integrated with Integration Services<br />

Figure 18-16<br />

Cancel out of all the dialogs to leave things as they were when we completed the wizard.<br />

Event Handlers<br />

556<br />

Moving over to the Event Handlers tab, we can see the many events that we can supply code for. Activate<br />

the drop-down (as I have in Figure 18-17). While the default is OnError, we can deal with a very<br />

wide range of scenarios. Let’s examine how a few of these might be used:<br />

❑ OnError: Well, I would hope that this is the most obvious one. As you would expect, this event<br />

is fired in the event an error is detected. It allows you to address the error in some fashion.<br />

❑ OnWarning: Basically the same as OnError, but it allows you to examine and possibly address<br />

warnings too.<br />

❑ OnProgress: For long running processes, this can be handy for updating some form of progress<br />

indicator (perhaps a status table somewhere).<br />

❑ OnPreExecute: Allows for things like preparation code to run prior to starting the main part of<br />

the task.<br />

And this is, of course, just a taste. What events to use will vary by need.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!