Transformation2 Object

DTS Programming

DTS Programming

Transformation2 Object

The generic Transformation2 object contains information about the class-specific transformation object and the source and destination columns it manipulates.

Extended Properties
TransformPhases Property
Remarks

The Transformation2 object extends the functionality of the Transformation object and inherits the properties and methods of that object. In addition, the TransformPhases property specifies which transform phases this transformation supports.

The Transformation2 object supports multiple transform phases, as shown in this table.

Phase Description
PreSourceData Occurs before first row is fetched from source connection.
Transform Occurs after each source row is fetched, before the destination row is written.
OnTransformFailure Occurs after a failure in the Transform phase, indicated by return of DTSTransformStat_Error or DTSTransformStat_ExceptionRow. Typically caused by conversion errors.
OnInsertSuccess Occurs after each data row is written successfully to the destination connection.
OnInsertFailure Occurs after each attempt to write a data row to the destination connection failed (for example, by attempting to write a duplicate value to a primary key field, or a NULL to a NOT NULL field).
OnBatchComplete Occurs in DataPumpTask2 when using the FastLoad option after each batch is written, successfully or unsuccessfully.
PostSourceData Occurs after the last row is written to the destination connection.
OnPumpComplete Occurs at the end of the task's execution.

The Transformation object only supports the Transform phase.

Only the DTSTransformScriptProperties2 object and custom transformations can support phases other than the Transform phase.

For more information about when to use the Transformation object instead of the Transformation2 object, see Extended DTS Objects.

See Also

Adding DTS Transformations

DTSTransformScriptProperties2 Object

Transformation Object

Transformations Collection