다음을 통해 공유


Application.UpdateObjects Property

Gets or sets a Boolean that indicates whether extensible objects can be updated at package load time if an updated version is found.

네임스페이스: Microsoft.SqlServer.Dts.Runtime
어셈블리: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

구문

‘선언
Public Property UpdateObjects As Boolean
public bool UpdateObjects { get; set; }
public:
property bool UpdateObjects {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_UpdateObjects ()

/** @property */
public void set_UpdateObjects (boolean value)
public function get UpdateObjects () : boolean

public function set UpdateObjects (value : boolean)

속성 값

true if extensible objects can be updated at package load time when an updated version is found; otherwise, false.

주의

When new versions of extensible objects such as the tasks, Foreach enumerators, log providers, and connection managers become available, existing packages can be updated at load time to reference the new objects. You can do this by setting the UpdateObjects to true before loading the package.

Each extensible object implements a CanUpdate property. The runtime tries to load the existing package, and if it finds a reference to an older object, the package tries to update its references. It first enumerates all the extensible objects it contains, excluding the Pipeline, which is treated separately and locally, and for each object, calls CanUpdate on the new object passing the ID of the old one. If the new object can update the old object, the old object is passed to the new one through the Update method, and the XML is changed in place. By default, all extensible objects implement CanUpdate to return false, in which case Update does nothing to the XML that is passed.

The following code example shows how to toggle the UpdateObjects property to enable or prevent updates. It sets the UpdateObjects to true, prints the value of the property, sets it to false, and prints out the value again.

class ApplicationTests
    {
        static void Main(string[] args)
        {
            Application app = new Application();
           
            Boolean updateObjs = true;
            app.UpdateObjects = updateObjs;
            Console.WriteLine(app.UpdateObjects);
            
            updateObjs = false;
            app.UpdateObjects = updateObjs;
            Console.WriteLine(app.UpdateObjects);
        }
    }
Class ApplicationTests
        Shared  Sub Main(ByVal args() As String)
            Dim app As Application =  New Application() 
 
            Dim updateObjs As Boolean =  True 
            app.UpdateObjects = updateObjs
            Console.WriteLine(app.UpdateObjects)
 
            updateObjs = False
            app.UpdateObjects = updateObjs
            Console.WriteLine(app.UpdateObjects)
        End Sub
End Class

Sample Output:

True

False

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

Application Class
Application Members
Microsoft.SqlServer.Dts.Runtime Namespace