ActiveX Script Task

Data Transformation Services

Data Transformation Services

ActiveX Script Task

With the Microsoft® ActiveX® Script task, you can write code to perform functions that are not available in the other tasks in Data Transformation Services (DTS) Designer. For example:

  • As a package executes, you can replace a two-digit state code in the source data with the legal abbreviation of the state in the destination data.

  • If the destination data is a table from which mailing labels are created, you can set the "title" column to "Mr.", "Mrs.", or a default of spaces.

  • You can validate important columns in the source data and skip records that contain invalid data to prevent them from being copied to the destination.

For more information, see Using ActiveX Scripts in DTS.

To execute a ActiveX script, you must have the scripting language library installed on the computers that will be running the package (for example, both the development and production computers). The languages that can be used to write your script include Microsoft Visual Basic® Scripting Edition (VBScript) and Microsoft JScript®.

Important  An ActiveX script can affect the execution speed of a DTS package as it executes on each row of the source data. Therefore, if performance is a priority, use scripting carefully when building a package. For more information, see Enhancing Performance of DTS Packages.

To add a DTS task to a DTS package