Uninitialize Method

DTS Programming

DTS Programming

Uninitialize Method

The Uninitialize method clears all state information and releases all related objects, allowing the Package object to be reused.

Applies To
Package Object Package2 Object
Syntax

Package.Uninitialize()

Part Description
Package Expression that evaluates to an object in the Applies To list

Remarks

The Uninitialize method clears the execution-related state of the Package2 object, including any event handlers registered or any active sessions made by a Connection object. You must call Uninitialize before the Package2 object is final-released because event handlers may contain a circular reference. All child objects of the Package2 object must be released before you call Uninitialize.

In Microsoft® Visual Basic®, release object references by setting the corresponding object variables to Nothing or allow the variables to go out of scope. If you have multiple Package or Package2 object variables, release all but one of them and execute the Uninitialize method against the one remaining reference.

This method does not affect the presence of any structural elements of the package, such as removing items that have been added to collections. To implement a new Package object, simply release all references to a prior one or its children, and then create a new one.

Prototype (C/C++)

HRESULT UnInitialize();

See Also

Managing DTS Package Programs