IDTSDataPumpTransform::Execute

DTS Programming

DTS Programming

IDTSDataPumpTransform::Execute

The Execute method executes the transformation for a single row.

Syntax

HRESULT Execute ( LPBYTE pvTransformServerData,
LPCDTSTransformColumnInfo pSrcColumnInfo,
LPDTSTransformColumnInfo pDestColumnInfo,
IDTSDataConvert *pIDTSDataConvert,
LPDTSTransformStatus peTransformStatus );

Argument Description
pvTransformServerData [in] Transformation server state data
pSrcColumnInfo [in] Source column and row data
pDestColumnInfo [in/out] Destination column and row data
pIDTSDataConvert [in] Pointer to the data conversion interface
peTransformStatus [out] Result of the transformation

Remarks

This function is called by the data pump and executes the specified transformation. The IDTSDataConvert interface is supplied to provide a DTS-compatible conversion utility. For more information, search include file dtspump.h for IDTSDataConvert. dtspump.h is installed by default to X:\Program Files\Microsoft SQL Server\80\Tools\DevTools\include\.

Execute returns NO_ERROR except when a fatal failure occurs. When Execute returns an error, the data pump terminates. Normal errors such as data violations should be handled as a returned peTransformStatus, which results in a call to IDTSDataPumpErrorSink::OnTransformError. Because some OLE DB providers may have restrictions on the number of storage objects that may be open, Execute should release any BLOB storage objects that do not need to be held during the destination insert upon completion, instead of waiting for OnRowComplete.

Column data should be written in the buffer referenced by DTSColumnData.pvData of the element for the destination column, at the offset specified by DBBINDING.obValue. You can instead store a pointer to the data at this location if you add the DBTYPE_BYREF flag to DBBINDING.wType. For more information and a description of these fields, see Column Information Structures in DTS Transformations.

Transformations that implement both IDTSDataPumpTransform and IDTSDataPumpTransform2 typically implement Execute by calling IDTSDataPumpTransform2::ProcessPhase with NULL for the pPhaseInfo parameter.

See Also

IDTSDataPumpTransform2::ProcessPhase