Script Task Examples
Aktualisiert: 14. April 2006
The Script task is a multi-purpose tool that you can use in a package to fill almost any requirement that is not met by the tasks included with Integration Services. This topic lists Script task code samples that demonstrate some of the available functionality.
Hinweis: |
---|
If you want to create tasks that you can more easily reuse across multiple packages, consider using the code in these Script task samples as the starting point for custom tasks. For more information, see Developing a Custom Task. |
In This Section
Example Topics
This section contains code examples that demonstrate various uses of the .NET Framework classes that you can incorporate into an Integration Services Script task.
Topic | Description |
---|---|
Checks a flat file to determine whether it contains rows of data, and saves the result to a variable for use in control flow branching. |
|
Gathers a list of files that meet user-specified criteria, and populates a variable for later use by the Foreach from Variable Enumerator. |
|
Retrieves user information from Active Directory based on the value of an Integration Services variable, by using classes in the System.DirectoryServices namespace. |
|
Creates a custom performance counter that can be used to track the execution progress of an Integration Services package, by using classes in the System.Diagnostics namespace. |
|
Compresses images into the JPEG format and creates thumbnail images from them, by using classes in the System.Drawing namespace. |
|
Locates installed printers that support a specific paper size, by using classes in the System.Drawing.Printing namespace. |
|
Sends a mail message in HTML format instead of plain text format. |
|
Lists the worksheets in an Excel file and checks for the existence of a specific worksheet. |
|
Sending to a Remote Private Message Queue with the Script Task |
Sends a message to a remote private message queue. |
Other Examples
The topics listed below also contain code examples for use with the Script task.
Topic | Description |
---|---|
Asks the user for confirmation of whether the package should continue to run, based on the value of a package variable that may exceed the limit specified in another variable. |
|
Retrieves a connection or connection information from connection managers defined in the package. |
|
Raises an error, a warning, or an informational message based on the status of the Internet connection on the server. |
|
Logs the number of items processed by the task to enabled log providers. |