DTS Programming

Adding DTS ActiveX Scripts

Microsoft® ActiveX® scripts can be used to add functionality to Data Transformation Services (DTS) packages. Typical supported scripts are Microsoft Visual Basic® Scripting Edition (VBScript), Microsoft JScript®, PerlScript and XMLScript. The following DTS object types require or can use ActiveX scripts:

You assign ActiveX scripts to a property of objects that use scripts as a single text string, which can include embedded carriage return/line feed pairs. Each scripted object also has properties for the script language and the script function name. For example:

The DTSTransformScriptProperties2 object extends the functionality of DataPumpTransformScript by providing multiple transformation phases. The script specified by the Text property must have a function for each supported phase.

The following table describes the property you use to specify the entry point for each phase the DTSTransformScriptProperties2 object supports.

Phase Entry Point Property
PreSourceData PreSourceDataFunctionEntry
Transform FunctionEntry
OnTransformFailure TransformFailureFunctionEntry
OnInsertSuccess InsertSuccessFunctionEntry
OnInsertFailure InsertFailureFunctionEntry
OnBatchComplete BatchCompleteFunctionEntry
PostSourceData PostSourceDataFunctionEntry
OnPumpComplete PumpCompleteFunctionEntry

For more information about including ActiveX scripts in DTS programs, see DTS ActiveX Scripts in Visual Basic.