IDTSDataPumpTransform::Initialize

DTS Programming

DTS Programming

IDTSDataPumpTransform::Initialize

The Initialize method allows the transformation server to initialize its state for the current transformation.

Syntax

HRESULT Initialize (
    LPCOLESTR
pwzName,
    VARIANT ServerParameters,
    LPBYTE *ppvTransformServerData);

Argument Description
pwzName [in] Transformation name
ServerParameters [in] Parameters to server for this transformation
ppvTransformServerData [out] Transformation server state data

Remarks

An instance of the transformation server object is created by ServerClsid and is passed to IDTSDataPump::AddTransform, unless this is an IUnknown object.

ServerParameters allows the Data Transformation Services (DTS) data pump to create an instance of an IDTSDataPumpTransform implementation and pass it to multiple IDTSDataPump::AddTransform calls. This is only used by custom transformation servers and can be helpful for internal operations such as aggregations. The transformation server should track this in the pvTransformServerData parameter to optimize operations such as AddVariable, OnRowComplete, and so on.

The output ppvTransformServerData is passed to all subsequent methods, so a single instance of a transformation server can be used to implement multiple separate transformations. Generally, you will need to allocate the storage whose reference you return in ppvTransformServerData. You need to release the storage in OnTransformComplete, or in ValidateSchema, if ValidateSchema returns an error.

See Also

IDTSDataPump::AddTransform

IDTSDataPumpTransform::AddVariable

IDTSDataPumpTransform::OnRowComplete

IDTSDataPumpTransform::OnTransformComplete

IDTSDataPumpTransform::ValidateSchema