IDTSDataPumpTransform2::SetExecuteThreadComplete

DTS Programming

DTS Programming

IDTSDataPumpTransform2::SetExecuteThreadComplete

The SetExecuteThreadComplete method performs any deallocations and cleanup that might be necessary because the Data Transformation Services (DTS) data pump instance (and thus the transformation) is going to continue execution on another thread. It is called when IDTSDataPump2::SetExecuteThreadComplete is called.

Syntax

HRESULT SetExecuteThreadComplete( );

The method has no parameters.

Remarks

Data pump execution can be segmented so that it processes one or more rows on a thread when IDTSDataPump2::ExecuteRow is called, then processes additional rows when ExecuteRow is called on another thread. The DTS tasks supplied with Microsoft® SQL Server™ 2000 do not cross threads like this, but custom tasks can do so. Custom tasks doing this must call IDTSDataPump2::SetExecuteThreadComplete on the original thread before calling ExecuteRow on the new thread. IDTSDataPump2::SetExecuteThreadComplete calls IDTSDataPumpTransform2::SetExecuteThreadComplete for each transformation.

In most cases, the transformation does not need to do anything. Only when the transformation has invoked a thread-affinitive process, it may need to close that process before re-opening it on the new thread. For example, if the transformation uses the ActiveScripting engine, it needs to make a separate copy of the scripting engine instance, then call IActiveScript::Close on the old thread, then initialize the scripting engine instance copy on the new thread.