ActiveX Script Transformation Properties

DTS Designer

DTS Designer Help

ActiveX Script Transformation Properties

Use this dialog box to define a transformation with a Microsoft® ActiveX® script. In this use of an ActiveX script, transformations are executed for every row of source data.

Options

Language tab

This tab lets you specify the scripting language and the functions to use in the ActiveX script.

Language
Select an available scripting language. When you install scripting languages on the computer, this list will update automatically. Microsoft Visual Basic® Scripting Edition (VBScript) and Microsoft JScript® are available by default.
Functions
Select a function from the script language library to be placed into the ActiveX script text box. Double-clicking on a function name inserts the function code into the text box at the position of the cursor.
Entry function
Specify the name of the function that will be the entry point when the ActiveX script runs. If you are adding functions for data pump phases, this function only refers to the entry point for the Row Transform phase function. If you are not adding a function for the Row Transform phase, this option is disabled.

Browser tab

View the tree that contains the return code constants, the Data Transformation Services (DTS) package global variables, the source and destination columns, and the lookups available for use in the ActiveX script. Click to expand nodes, and double-click on an item to copy the information into the ActiveX script text box.

Phases tab

Select the data pump phases for which you plan to add ActiveX scripts, and then type the name of each function beneath the appropriate phase name. You must include an ActiveX script function in the text box for each selected phase, and the function name in the scripting box must match the function name entered on this tab.

Note  This tab only appears if you enabled multiphase data pump functionality in SQL Server Enterprise Manager.

ActiveX script text box

Write or paste the scripting code necessary to perform the functions you need. The scripting editor has limited functionality. It does not include features such as statement completion or color-coding of reserved words. Comment lines use the apostrophe (') character syntax in any column, and all text from the comment character to the end of the line is ignored.

Auto Gen.

Generate a single function and a line of code containing the return code, if supported by the selected scripting language.

Important  If there is scripting code in the ActiveX script text box, the code will be deleted when you click Auto Gen.

Browse

Display the Select File dialog box, where you can select a file containing code. When you select a file, the contents of that file are copied into the ActiveX script text box.

Important  Opening an external script file from the Select File dialog box will overwrite any existing code in the ActiveX script text box. Therefore, always select code files before inserting any other code into the box.

.

Parse

Check the syntax of the ActiveX script.

Save

Display the Save As dialog box, where you can save all the code in the ActiveX script text box into a file on the local hard drive or on any mapped drive.

Undo

Reverse a limited number of text entry actions. You cannot undo actions such as adding code through the Select File dialog box.

Test

Test the transformation by executing it against a part of the source data and copying the results to a temporary text file for preview purposes. This option is not available for ActiveX script transformations in a Data Driven Query task.

Because test mode sends data to a file rather than the actual destination, problems with the provider, the destination, or data type overflow may not be detected.

See Also

Using ActiveX Scripts in DTS

Mapping Column Transformations

Using Global Variables with DTS Packages

Debugging ActiveX Scripts

Using Return Codes in DTS

Multiphase Data Pump Functionality