*** Member deprecated; see Remarks. *** Gets or sets a Boolean that indicates whether extensible objects can be updated at package load time if an updated version is found.
Assembly: Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)
'Declaration Public Property UpdateObjects As Boolean Get Set 'Usage Dim instance As Application Dim value As Boolean value = instance.UpdateObjects instance.UpdateObjects = value
Property ValueType: System.Boolean
true if extensible objects can be updated at package load time when an updated version is found; otherwise, false.
This member will be removed in a future version of MicrosoftSQL Server. Avoid using this member in new development work, and plan to modify applications that currently use this member.
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 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 property to enable or prevent updates. It sets the to true, prints the value of the property, sets it to false, and prints out the value again.
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