Database Reference
In-Depth Information
project from within the script editor, so you can periodically check your code for com-
pilation errors before closing the editing window. In the menu bar of the script editor,
you'll find the option to Build Build [ script project name ] to compile all of the
code in your script project. When you build the project in this manner, any errors found
during compilation will be reported in the Error List window ( Figure 3-4 ).
Figure 3-4 . Error List
Also present in the Error List windows are any warnings generated by the compiler;
although they don't prevent the code from being compiled, it's always a wise idea to
perform a thorough review of any warnings that appear in this list before sending the
code any further down the development process.
The Script Task
Within the control flow pane, the workspace for writing custom code is the Script task.
Although it technically can be used for direct data manipulation, this tool is best suited
for supporting operations that can't easily be accomplished using native control flow
tasks. Think of the Script task as a helper object to be used to tie together other data-
centric operations within the package.
The following are a few requirements frequently served by the Script task:
• Checking for the existence and accessibility of source or destination
files
• Using a file archive utility API to zip or unzip files
• Generating custom event messages (such as HTML-formatted e-mail
messages)
• Setting variable values
• Performing cleanup operations upon package completion or if an error
occurs
 
 
Search WWH ::




Custom Search